Automatically update flake.lock to the latest version #164
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
# SPDX-FileCopyrightText: 2023 Serokell <https://serokell.io/> | |
# | |
# SPDX-License-Identifier: MPL-2.0 | |
name: Nix flake check | |
on: | |
pull_request: | |
push: | |
branches: master | |
jobs: | |
validate: | |
runs-on: [self-hosted, nix] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: xrefcheck | |
run: nix run github:serokell/xrefcheck | |
- name: reuse | |
run: nix build -L .#checks.x86_64-linux.reuse-lint | |
# Run step even if the previous one has failed | |
if: success() || failure() | |
- name: hlint | |
run: nix build -L .#checks.x86_64-linux.hlint | |
if: success() || failure() | |
- name: stylish-haskell | |
run: nix build -L .#checks.x86_64-linux.stylish-haskell | |
if: success() || failure() | |
- name: check-trailing-whitespace | |
run: nix build -L .#checks.x86_64-linux.trailing-whitespace | |
if: success() || failure() | |
- name: check-hpack | |
run: nix build -L .#checks.x86_64-linux.hpack | |
if: success() || failure() | |
# Export JSON serialized ghc-versions | |
ghc-versions: | |
runs-on: [self-hosted, nix] | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: set-matrix | |
run: echo "matrix=$(nix eval --json .#ghc-matrix.x86_64-linux)" >> $GITHUB_OUTPUT | |
build-and-test: | |
needs: ghc-versions | |
name: ghc${{ matrix.ghc }} | |
runs-on: [self-hosted, nix] | |
strategy: | |
fail-fast: false | |
matrix: ${{fromJson(needs.ghc-versions.outputs.matrix)}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: build | |
run: nix build -L .#checks.x86_64-linux.ghc${{ matrix.ghc }}:build-all --keep-going | |
- name: test | |
run: nix build -L .#checks.x86_64-linux.ghc${{ matrix.ghc }}:test-all --keep-going | |
if: success() || failure() |