Update CI workflow which seems to have bitrotted #70
Workflow file for this run
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
name: Continuous integration | |
on: [push, pull_request] | |
env: | |
# Bump this number to invalidate the Github-actions cache | |
cache-invalidation-key: 0 | |
nixpkgs-url: https://github.com/NixOS/nixpkgs/archive/7f9be6a505a31f88499c5d20d11f98accf5ae6ba.tar.gz | |
nix-cmd: nix-shell --pure --arg withDevTools "false" --run | |
jobs: | |
ormolu: | |
name: check formatting with ormolu | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: cachix/install-nix-action@v15 | |
with: | |
nix_path: "${{ env.nixpkgs-url }}" | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: aspiwack | |
# If you chose API tokens for write access OR if you have a private cache | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: Build Nix dependencies | |
run: ${{ env.nix-cmd }} "echo '=== Nix dependencies installed ==='" | |
- name: Check formatting | |
run: ${{ env.nix-cmd }} 'just format check' | |
test: | |
name: stack build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: cachix/install-nix-action@v15 | |
with: | |
nix_path: "${{ env.nixpkgs-url }}" | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: aspiwack | |
# If you chose API tokens for write access OR if you have a private cache | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: Cache Stack dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.stack | |
key: stack-deps-${{ runner.os }}-${{ hashFiles('nix/sources.json') }}-v${{ env.cache-invalidation-key }}-${{ hashFiles('stack.yaml.lock', 'benign.cabal') }}-${{ github.sha }} | |
restore-keys: stack-deps-${{ runner.os }}-${{ hashFiles('nix/sources.json') }}-v${{ env.cache-invalidation-key }}-${{ hashFiles('stack.yaml.lock', 'benign.cabal') }}- | |
- name: Build Nix dependencies | |
run: ${{ env.nix-cmd }} "echo '=== Nix dependencies installed ==='" | |
- name: Build | |
run: ${{ env.nix-cmd }} "stack build --pedantic --test" |