chore(deps): update github-actions (non-major) (#1096) #91
This file contains hidden or 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: Unit Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - "system_files/**" | |
| - "tests/**" | |
| - "scripts/validate-brewfiles.sh" | |
| - "Justfile" | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "system_files/**" | |
| - "tests/**" | |
| - "scripts/validate-brewfiles.sh" | |
| - "Justfile" | |
| merge_group: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || github.run_id }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - name: Install test deps | |
| run: | | |
| sudo apt-get install -y bats | |
| pip install pytest pytest-cov pyyaml | |
| - name: Run shellcheck — extensionless scripts | |
| run: | | |
| shellcheck \ | |
| system_files/shared/usr/bin/ublue-system-setup \ | |
| system_files/shared/usr/bin/ublue-user-setup \ | |
| system_files/shared/usr/bin/ublue-privileged-setup \ | |
| system_files/shared/usr/bin/ublue-bling \ | |
| system_files/shared/usr/bin/luks-tpm2-autounlock \ | |
| system_files/shared/usr/bin/ublue-fastfetch \ | |
| system_files/shared/usr/lib/ublue/setup-services/libsetup.sh \ | |
| system_files/bluefin/usr/libexec/bluefin-dynamic-wallpaper \ | |
| system_files/bluefin/usr/libexec/get-geoclue-latitude | |
| - name: Run shellcheck — .sh scripts | |
| run: find system_files -name '*.sh' -print0 | xargs -0 shellcheck -e SC1091 | |
| - name: Run pytest (hooks.py) | |
| run: python3 -m pytest tests/test_hooks.py tests/test_chairlift_config.py -v --cov=system_files/bluefin/etc/bazaar --cov-report=term-missing --cov-report=xml:coverage.xml --cov-report=html:coverage-html --cov-fail-under=80 | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: always() | |
| with: | |
| name: coverage-report | |
| path: | | |
| coverage.xml | |
| coverage-html/ | |
| retention-days: 7 | |
| - name: Run bats (libsetup.sh) | |
| run: bats tests/test_libsetup.bats | |
| - name: Run bats (setup scripts) | |
| run: bats tests/test_setup_scripts.bats | |
| - name: Run bats (privileged setup) | |
| run: bats tests/test_privileged_setup.bats | |
| - name: Run bats (ublue-bling) | |
| run: bats tests/test_bling.bats | |
| - name: Run bats (bling.sh) | |
| run: bats tests/test_bling_sh.bats | |
| - name: Run bats (luks-tpm2-autounlock) | |
| run: bats tests/test_luks_tpm2.bats | |
| - name: Run bats (rechunker-group-fix) | |
| run: bats tests/test_rechunker_group_fix.bats | |
| - name: Run bats (ublue-bling-fastfetch) | |
| run: bats tests/test_bling_fastfetch.bats | |
| - name: Run bats (changelog.just) | |
| run: bats tests/test_changelog.bats | |
| - name: Run bats (update.just and native recipes) | |
| run: bats tests/test_update_just.bats tests/test_native_recipes.bats | |
| - name: Run bats (ublue-fastfetch) | |
| run: bats tests/test_ublue_fastfetch.bats | |
| - name: Run bats (motd integration) | |
| run: bats tests/test_motd_integration.bats | |
| - name: Run bats (ublue-image-info.sh) | |
| run: bats tests/test_ublue_image_info.bats | |
| - name: Run bats (profile.d — caffeinate.sh + uutils.sh) | |
| run: bats tests/test_profile_d.bats | |
| - name: Run bats (bluefin-dynamic-wallpaper) | |
| run: bats tests/test_dynamic_wallpaper.bats | |
| - name: Run bats (get-geoclue-latitude) | |
| run: bats tests/test_geoclue_latitude.bats | |
| - name: Run bats (brew-preinstall) | |
| run: bats tests/test_brew_preinstall.bats | |
| - name: Test Brewfile validator | |
| run: | | |
| shellcheck scripts/validate-brewfiles.sh tests/test_validate_brewfiles.bats | |
| bats tests/test_validate_brewfiles.bats | |
| - name: Run bats (oem-brew hook) | |
| run: bats tests/test_oem_brew.bats | |
| - name: Run bats (bonedigger report) | |
| run: bats tests/test_bonedigger_report.bats | |
| - name: Smoke-test brew bundle accepts preinstall Brewfile (real Homebrew) | |
| run: | | |
| eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
| brew bundle list --file=system_files/shared/usr/share/ublue-os/homebrew/preinstall.d/system-cli.Brewfile |