Update prelude.sh #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ubuntu 22.04 GH runner | |
on: | |
push: | |
branches: [ "devel", "testing", "stable", "minimal" ] | |
paths: | |
- 'run_init.sh' | |
- 'prelude.sh' | |
- 'CommonInitScripts/*.sh*' | |
- '.github/workflows/Ubuntu_22.04_runner.yml' | |
- 'WSL_Ubuntu_22.04/*.sh' | |
pull_request: | |
branches: [ "devel", "testing", "stable", "minimal" ] | |
paths: | |
- 'run_init.sh' | |
- 'prelude.sh' | |
- 'CommonInitScripts/*.sh*' | |
- '.github/workflows/Ubuntu_22.04_runner.yml' | |
- 'WSL_Ubuntu_22.04/*.sh' | |
jobs: | |
build: | |
continue-on-error: true | |
name: With GNOME - ${{ matrix.install-gnome }} | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
install-gnome: ['yes', 'no'] # TODO add this to containers.yml | |
steps: | |
- name: Update APT & upgrade | |
run: sudo apt-get update -y && sudo apt-get upgrade -y | |
# TODO - BUG - use the correct respective branch - check that it is resolved | |
- name: Install GNOME - ${{ matrix.install-gnome }} | |
run: | | |
if [[ ${{ matrix.install-gnome }} == 'yes' ]]; then | |
sudo apt-get install -y ubuntu-desktop-minimal | |
fi | |
- 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 {} |