Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@ on:
branches: [master]
pull_request:

permissions:
contents: read
pages: write
id-token: write

jobs:
build-with-stack:
name: Build and test on ${{ matrix.os }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
Expand Down Expand Up @@ -80,6 +88,29 @@ jobs:
echo "coverage too low"
exit 1
fi
- name: Prepare coverage report
if: |
matrix.os == 'ubuntu-latest' &&
github.event_name == 'push' &&
github.ref == 'refs/heads/master'
run: |
mkdir -p coverage
cp -r $(find .stack-work/install -name hpc) coverage/
- name: Upload artifact
if: |
matrix.os == 'ubuntu-latest' &&
github.event_name == 'push' &&
github.ref == 'refs/heads/master'
uses: actions/upload-pages-artifact@v3
with:
path: coverage
- name: Deploy to GitHub Pages
if: |
matrix.os == 'ubuntu-latest' &&
github.event_name == 'push' &&
github.ref == 'refs/heads/master'
id: deployment
uses: actions/deploy-pages@v4
generate-matrix:
name: Generate matrix from cabal
outputs:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ cabal.project.*.local
dist-newstyle/
dist/
TAGS
.hpc/
.stack-work/
.ghc.environment.*
**/*~
**/#*#
**/.#*
**/.#*
Loading