feat: Triggers #20
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: "Test" | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
defaults: | |
run: | |
shell: devenv shell bash -- -e {0} | |
jobs: | |
tests: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v26 | |
- uses: cachix/cachix-action@v14 | |
with: | |
name: devenv | |
- name: Install devenv.sh | |
shell: sh | |
run: nix profile install nixpkgs#devenv | |
- name: Cache Cabal | |
id: cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cabal | |
dist-newstyle | |
.devenv/profile | |
key: ${{ runner.os }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/*.lock') }}-1 # modify the key if the cache is not working as expected | |
- name: Update Cabal Hackage list | |
# if: steps.cache.outputs.cache-hit != 'true' | |
run: run-update | |
# - name: Build the devenv shell and run any pre-commit hooks | |
# run: devenv test | |
- name: Build the project | |
run: run-build | |
- name: Run core tests | |
run: run-core-tests | |
- name: Run CLI tests | |
run: run-cli-tests |