Skip to content

Add CI build test stubs for all platforms #271

Add CI build test stubs for all platforms

Add CI build test stubs for all platforms #271

name: WSL_Ubuntu_22.04 - iniPC script
on:
push:
branches: [ "devel", "testing", "stable", "minimal" ]
paths:
- 'run_init.sh'
- 'prelude.sh'
- 'CommonInitScripts/*.sh*'
- '.github/workflows/Test_WSL_Ubuntu_22.04.yml'
- 'WSL_Ubuntu_22.04/*.sh'
pull_request:
branches: [ "devel", "testing", "stable", "minimal" ]
paths:
- 'run_init.sh'
- 'prelude.sh'
- 'CommonInitScripts/*.sh*'
- '.github/workflows/Test_WSL_Ubuntu_22.04.yml'
- 'WSL_Ubuntu_22.04/*.sh'
jobs:
build:
runs-on: ubuntu-22.04
steps:
# TODO - BUG - use the correct respective branch - check that it is resolved
- uses: actions/checkout@v4
- name: print `github.ref=${{ github.ref }}` and `github.sha=${{ github.sha }}`
run: "echo Ref: ${{ github.ref }}, SHA: ${{ github.sha }}"
- name: Running iniPC script for the 1st time should not fail.
run: ./run_init.sh --noninteractive
- name: save ~/ for idempotency test
run: cp -r ~/ /tmp/old_home/
- name: Running iniPC script for the 2nd time should not fail.
run: ./run_init.sh --noninteractive
# TODO split this command to multiple lines
# TODO also test that the first run of initPC script does change the state of home dir
# TODO - test whether the test works as expected
- name: The initPC script should be idempotent on ~/ directory (WIP - needs testing)
run: |
cd ~
pwd
find . -type f \( ! -iname "*.log" ! -path "*/.dotfiles/logs/HEAD" \
! -path "*work/_temp/*" ! -path "./runners/*" \
! -name ".wget-hsts" \) -print0 |
xargs -0 -I{} bash -c 'if ! diff "$1" "/tmp/old_home/$1"; then echo "diff failed for: $1"; exit 1; fi' bash {}