Merge pull request #37 from DeterminateSystems/release-v2.2.0/3013a65… #124
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
| on: | |
| merge_group: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| run-systems: | |
| # if: github.event_name == 'merge_group' | |
| name: "Test: ${{ matrix.systems.nix-system }}" | |
| runs-on: "${{ matrix.systems.runner }}" | |
| permissions: | |
| id-token: "write" | |
| contents: "read" | |
| env: | |
| ACTIONS_STEP_DEBUG: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| systems: | |
| - nix-system: "aarch64-darwin" | |
| runner: "macos-latest" | |
| - nix-system: "aarch64-linux" | |
| runner: "namespace-profile-default-arm64" | |
| - nix-system: "x86_64-linux" | |
| runner: "ubuntu-22.04" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Nix on ${{ matrix.systems.nix-system }} system | |
| uses: DeterminateSystems/determinate-nix-action@main | |
| with: | |
| extra-conf: | | |
| narinfo-cache-negative-ttl = 0 | |
| - name: Cache the store | |
| uses: ./ | |
| with: | |
| _internal-strict-mode: true | |
| - name: Check the cache for liveness | |
| env: | |
| EXPECT_GITHUB_CACHE: ${{ toJson(false) }} | |
| run: | | |
| .github/workflows/cache-test.sh | |
| lint: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: "write" | |
| contents: "read" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: DeterminateSystems/determinate-nix-action@v3 | |
| - uses: ./. | |
| - run: nix develop -c typos | |
| if: success() || failure() | |
| - run: nix develop -c ruff check | |
| if: success() || failure() | |
| - run: nix develop -c ruff format --diff | |
| if: success() || failure() | |
| - run: nix develop -c shellcheck ./tools/*.sh | |
| if: success() || failure() | |
| - name: Regenerate the README to make sure it is unchanged | |
| run: nix develop -c ./tools/generate.sh | |
| if: success() || failure() | |
| - name: Assert no changes were made | |
| run: git diff --exit-code | |
| if: success() || failure() | |
| success: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - run-systems | |
| - lint | |
| if: always() | |
| steps: | |
| - run: "true" | |
| - run: | | |
| echo "A dependent in the build matrix failed." | |
| exit 1 | |
| if: | | |
| contains(needs.*.result, 'failure') || | |
| contains(needs.*.result, 'cancelled') |