Sync up GHC version #340
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: Check | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
validate-nix: | |
name: Validate Nix | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
- run: nix flake check | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
- run: nix develop -c cabal update | |
- run: nix develop -c cabal freeze | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cabal/store | |
key: cabal-${{ runner.os }}-${{ hashFiles('cabal.project.freeze') }} | |
- run: nix develop -c cabal build | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
- run: nix develop -c cabal update | |
- run: nix develop -c cabal freeze | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cabal/store | |
key: cabal-${{ runner.os }}-${{ hashFiles('cabal.project.freeze') }} | |
- run: nix develop -c cabal test | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
- run: nix develop -c hlint lib cli test | |
fmt: | |
name: Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
# stylish-haskell doesn't have a check/dry run option, so we'll run it | |
# against files in place and test if there are any diffs with Git. | |
- run: | | |
nix develop -c stylish-haskell -ir lib cli test | |
git diff-index --exit-code HEAD | |
typecheck-ts: | |
name: Typecheck TypeScript | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: .golden/ts/ | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/yarn/v6 | |
key: yarn-${{ runner.os }}-${{ hashFiles('.golden/ts/yarn.lock') }} | |
- run: nix develop -c yarn install --frozen-lockfile | |
- run: nix develop -c yarn typecheck |