Adds website linting workflow #153
Workflow file for this run
This file contains hidden or 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 | |
| jobs: | |
| tests: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Install current Bash on macOS | |
| if: runner.os == 'macOS' | |
| run: brew install bash | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v27 | |
| - name: Build the project with Nix | |
| run: nix-build | |
| - 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: nix-shell --run "cabal update" | |
| - name: Build the project with cabal | |
| run: nix-shell --run "cabal build all" | |
| - name: Run core tests | |
| run: nix-shell --run "cabal test core" | |
| - name: Run core doctests | |
| run: nix-shell --run "run-doctests-verbose" | |
| - name: Run CLI tests | |
| run: nix-shell --run "cabal test cli" |