Skip to content

Fix Moment Ord

Fix Moment Ord #109

Workflow file for this run

---
name: ci
on: # yamllint disable-line rule:truthy rule:comments
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
cabal:
strategy:
fail-fast: false
matrix:
ghc:
- "9.10.1"
- "9.12.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
run: cabal configure --enable-tests --ghc-options -Werror
- name: Build
run: cabal build exe:pacer
- name: Unit tests
id: unit
run: cabal test pacer:unit --test-options '--hedgehog-tests 1000000'
- uses: actions/upload-artifact@v4
name: Unit tests upload
if: ${{ failure() && steps.unit.conclusion == 'failure' }}
with:
name: unit-tests-artifacts-${{ matrix.os }}
path: |
test/unit/goldens
- name: Functional tests
id: functional
run: cabal test pacer:functional
- uses: actions/upload-artifact@v4
name: Functional tests upload
if: ${{ failure() && steps.functional.conclusion == 'failure' }}
with:
name: functional-tests-artifacts-${{ matrix.os }}
path: |
test/functional/goldens
- name: Generate charts html/hs
# TODO: It would be nice if we could test that the html page actually
# does what we want because it is possible for webpack to succeed yet
# the page is broken.
#
# It may be possible to require 0 console errors, though of course that
# could be overly restrictive.
run: |
cabal run pacer -- chart --data examples
# Let's test it overwrites successfully
cabal run pacer -- chart --data examples
nix:
strategy:
fail-fast: false
matrix:
os:
- "macos-latest"
- "ubuntu-latest"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup nix
uses: cachix/install-nix-action@v30
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-unstable
- name: Compile & Test
run: nix build -L
lint:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- name: Setup nix
uses: cachix/install-nix-action@v30
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
# TODO: Re-enable once hlint is working with ghc 9.10.
#
# 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