Fix windows ci #26
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: ci | |
on: # yamllint disable-line rule:truthy rule:comments | |
push: | |
branches: | |
- main | |
- chart.js | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
cabal: | |
strategy: | |
fail-fast: false | |
matrix: | |
ghc: | |
- "9.8.2" | |
- "9.10.1" | |
os: | |
- "macos-latest" | |
- "ubuntu-latest" | |
- "windows-latest" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup haskell | |
uses: haskell-actions/setup@v2 | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 23.x | |
- name: Configure backend | |
run: cabal configure --enable-tests --ghc-options -Werror | |
- name: Compile backend | |
run: cabal build pacer | |
- name: Backend unit tests | |
id: backend-unit | |
run: cabal test pacer:unit --test-options '--hedgehog-tests 1000000' | |
- uses: actions/upload-artifact@v3 | |
name: Backend unit tests upload | |
if: ${{ failure() && steps.backend-unit.conclusion == 'failure' }} | |
with: | |
name: backend-unit-tests-artifacts | |
path: | | |
backend/test/unit/goldens | |
- name: Backend functional tests | |
id: backend-functional | |
run: cabal test pacer:functional | |
- uses: actions/upload-artifact@v3 | |
name: Backend functional tests upload | |
if: ${{ failure() && steps.backend-functional.conclusion == 'failure' }} | |
with: | |
name: backend-functional-tests-artifacts | |
path: | | |
backend/test/functional/goldens | |
# yamllint disable rule:line-length | |
- name: Generate charts json with backend | |
run: | | |
cabal run pacer -- chart --runs backend/data/input/example/runs.toml --chart-requests backend/data/input/example/chart-requests.toml | |
# yamllint enable rule:line-length | |
- name: Install web dependencies | |
run: | | |
cd web | |
npm install | |
- name: Build frontend | |
run: | | |
cd web | |
npx webpack | |
lint: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup nix | |
uses: cachix/install-nix-action@v25 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
nix_path: nixpkgs=channel:nixos-unstable | |
- name: Formatting | |
run: | | |
nix run .#format | |
git diff --exit-code --color=always | |
- name: HLint | |
run: nix run .#lint | |
# Don't usually want this in CI, but we have this here to test that | |
# it actually runs. | |
- name: Refactor | |
run: nix run .#lint-refactor |