Update prelude.sh #36
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
# TODO TODELETE (it is already done via matrix in...) | |
name: Ubuntu_22.04 - iniPC script | |
on: | |
push: | |
branches: [ "devel", "testing", "stable", "minimal" ] | |
paths: | |
- 'run_init.sh' | |
- 'prelude.sh' | |
- 'CommonInitScripts/*.sh*' | |
- '.github/workflows/Test_Ubuntu_22.04.yml' | |
- 'WSL_Ubuntu_22.04/*.sh' | |
- 'Ubuntu_22.04/*.sh' | |
pull_request: | |
branches: [ "devel", "testing", "stable", "minimal" ] | |
paths: | |
- 'run_init.sh' | |
- 'prelude.sh' | |
- 'CommonInitScripts/*.sh*' | |
- '.github/workflows/Test_Ubuntu_22.04.yml' | |
- 'WSL_Ubuntu_22.04/*.sh' | |
- 'Ubuntu_22.04/*.sh' | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Update APT | |
run: sudo apt-get update -y && sudo apt-get upgrade -y | |
- name: Install GNOME | |
run: sudo apt-get install -y ubuntu-desktop-minimal | |
# 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 {} |