chore(deps): update actions/upload-artifact action to v5 #144
  
    
      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: Main push and PR checks | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [macos-latest, ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| # No caching as we're expected to run rarely | |
| - name: Install dependencies and run checks | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| python3 -m venv venv | |
| source venv/bin/activate | |
| python3 -m pip install pre-commit | |
| export PRE_COMMIT_COLOR=always | |
| shfmt_docker=$(type docker &>/dev/null && echo shfmt-docker || :) | |
| for hook in shfmt shfmt-src $shfmt_docker; do | |
| pre-commit try-repo . $hook --files .github/workflows/test-good.sh | |
| done | |
| for hook in shfmt $shfmt_docker; do | |
| ! pre-commit try-repo . $hook --files .github/workflows/test-bad.sh | |
| ! git diff --exit-code .github/workflows/test-bad.sh | |
| git restore .github/workflows/test-bad.sh | |
| done |