Scrap and build v0.1.0 #87
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: ci | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: lint | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # lint:haskell runs hlint via `stack exec --package hlint`, so the lint job needs the same | |
| # stack toolchain and caches as the test job. | |
| - uses: haskell-actions/setup@v2 | |
| id: setup | |
| with: | |
| ghc-version: "9.6.7" | |
| enable-stack: true | |
| stack-version: "3.7.1" | |
| - name: Resolve cache key inputs | |
| id: cache-key | |
| shell: bash | |
| run: | | |
| echo "snapshot=$(grep '^snapshot:' stack.yaml | awk '{print $2}')" >> "$GITHUB_OUTPUT" | |
| - name: Cache ~/.stack | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.setup.outputs.stack-root }} | |
| key: ${{ runner.os }}-stack-v2-${{ steps.cache-key.outputs.snapshot }}-${{ hashFiles('stack.yaml', 'stack.yaml.lock', 'haskell/**/package.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-stack-v2-${{ steps.cache-key.outputs.snapshot }}- | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .node-version | |
| - uses: pnpm/action-setup@v4 | |
| - name: pnpm install | |
| run: pnpm install --frozen-lockfile | |
| - name: pnpm typecheck | |
| run: pnpm run typecheck | |
| - name: pnpm lint | |
| run: pnpm run lint | |
| test: | |
| name: test | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: haskell-actions/setup@v2 | |
| id: setup | |
| with: | |
| ghc-version: "9.6.7" | |
| enable-stack: true | |
| stack-version: "3.7.1" | |
| - name: Resolve cache key inputs | |
| id: cache-key | |
| shell: bash | |
| run: | | |
| echo "snapshot=$(grep '^snapshot:' stack.yaml | awk '{print $2}')" >> "$GITHUB_OUTPUT" | |
| - name: Cache ~/.stack | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.setup.outputs.stack-root }} | |
| key: ${{ runner.os }}-stack-v2-${{ steps.cache-key.outputs.snapshot }}-${{ hashFiles('stack.yaml', 'stack.yaml.lock', 'haskell/**/package.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-stack-v2-${{ steps.cache-key.outputs.snapshot }}- | |
| - name: Cache .stack-work | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| .stack-work | |
| haskell/*/.stack-work | |
| key: ${{ runner.os }}-stackwork-v2-${{ steps.cache-key.outputs.snapshot }}-${{ hashFiles('haskell/**/*.hs', 'haskell/**/package.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-stackwork-v2-${{ steps.cache-key.outputs.snapshot }}- | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .node-version | |
| - uses: pnpm/action-setup@v4 | |
| - name: pnpm install | |
| run: pnpm install --frozen-lockfile | |
| - name: Build (Haskell) | |
| run: stack build --fast | |
| - name: Build (TypeScript) | |
| run: pnpm -r run build | |
| - name: Test | |
| run: pnpm run test |