run_all.sh: Instal optional packages by default #260
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 GH | |
on: | |
push: | |
branches: [ "devel", "testing", "stable", "LTS" ] | |
paths: | |
- '*.sh' | |
- 'CommonInitScripts/**.sh*' | |
- 'UbuntuCLI/**.sh' | |
- 'Ubuntu_22.04/**.sh' | |
- 'Ubuntu_22.04/RootDotfiles/**' | |
- '.github/workflows/UbuntuGH.yml' | |
pull_request: | |
branches: [ "devel", "testing", "stable", "LTS" ] | |
jobs: | |
build: | |
name: ${{ matrix.install-gui }} on ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
install-gui: ['GNOME', 'NO GUI'] # TODO add this to containers.yml | |
os: [ubuntu-22.04, ubuntu-24.04] # TODO consider adding 20.04 | |
runs-on: ${{ matrix.os }} | |
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: ${{ matrix.install-gui }} - ${{ matrix.os }} | |
run: | | |
if [[ "${{ matrix.install-gui }}" == 'GNOME' ]]; 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 | |
# TODO - add more paths e.g. /etc/ a.s.o. | |
# TODO - be more specific in work/_temp/ path | |
- name: The initPC script should be idempotent on ~/ directory (WIP - needs testing) | |
run: | | |
cd ~ | |
pwd | |
find . -type f \( \ | |
! -path "./.cargo/.global-cache" \ | |
! -path "./.cache/*" \ | |
! -path "./.dotfiles/logs/HEAD" \ | |
! -path "*work/_temp/*" \ | |
! -path "./runners/*" \ | |
! -iname "*.log" \ | |
! -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 {} |