bench513ec5af1
CI: update actions to Node 24, run once per change, lint install scripts
actions/checkout v7 drops the Node 20 deprecation warning. Pushes run on master only, so a PR no longer builds twice; superseded runs are cancelled. Builds use the committed Cargo.lock.
+25 −4
1 file changed
- M .github/workflows/ci.yml +25 −4
| @@ -2,8 +2,14 @@ name: CI | |||
| 2 | 2 | ||
| 3 | 3 | on: | |
| 4 | 4 | push: | |
| 5 | + | branches: [master] | |
| 5 | 6 | pull_request: | |
| 6 | 7 | ||
| 8 | + | # A newer push to the same branch or PR supersedes the running check. | |
| 9 | + | concurrency: | |
| 10 | + | group: ci-${{ github.ref }} | |
| 11 | + | cancel-in-progress: true | |
| 12 | + | ||
| 7 | 13 | env: | |
| 8 | 14 | CARGO_TERM_COLOR: always | |
| 9 | 15 | ||
| @@ -16,7 +22,7 @@ jobs: | |||
| 16 | 22 | os: [ubuntu-latest, windows-latest, macos-latest] | |
| 17 | 23 | runs-on: ${{ matrix.os }} | |
| 18 | 24 | steps: | |
| 19 | − | - uses: actions/checkout@v4 | |
| 25 | + | - uses: actions/checkout@v7 | |
| 20 | 26 | - uses: dtolnay/rust-toolchain@stable | |
| 21 | 27 | with: | |
| 22 | 28 | components: clippy | |
| @@ -26,6 +32,21 @@ jobs: | |||
| 26 | 32 | sudo apt-get update | |
| 27 | 33 | sudo apt-get install -y libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev | |
| 28 | 34 | - uses: Swatinem/rust-cache@v2 | |
| 29 | − | - run: cargo build --workspace --release | |
| 30 | − | - run: cargo test --workspace | |
| 31 | − | - run: cargo clippy --workspace --all-targets -- -D warnings | |
| 35 | + | - run: cargo build --workspace --release --locked | |
| 36 | + | - run: cargo test --workspace --locked | |
| 37 | + | - run: cargo clippy --workspace --all-targets --locked -- -D warnings | |
| 38 | + | ||
| 39 | + | scripts: | |
| 40 | + | name: install scripts | |
| 41 | + | runs-on: ubuntu-latest | |
| 42 | + | steps: | |
| 43 | + | - uses: actions/checkout@v7 | |
| 44 | + | - name: shellcheck install.sh | |
| 45 | + | run: shellcheck install.sh | |
| 46 | + | - name: PSScriptAnalyzer install.ps1 | |
| 47 | + | shell: pwsh | |
| 48 | + | run: | | |
| 49 | + | # Write-Host is the right tool for an installer piped into iex. | |
| 50 | + | $issues = Invoke-ScriptAnalyzer -Path install.ps1 -Severity Warning,Error -ExcludeRule PSAvoidUsingWriteHost | |
| 51 | + | $issues | Format-Table -AutoSize | |
| 52 | + | if ($issues) { exit 1 } | |