This repository has been archived by the owner on Dec 2, 2023. It is now read-only.
Actions: Setup GHC's version #157
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: Unit tests | |
on: | |
push: | |
branches: | |
- '*' | |
jobs: | |
run: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Wait for tests to succeed | |
uses: lewagon/[email protected] | |
with: | |
ref: ${{ github.ref }} | |
check-name: 'Build (LTS 20.21)' | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
wait-interval: 30 | |
- uses: actions/[email protected] | |
- uses: ./.github/actions/install-stack | |
- uses: ./.github/actions/cache | |
- name: Install Coverage utility | |
run: stack install hpc-codecov | |
- name: Run unit tests | |
run: stack test --coverage | |
- name: Process Coverage report | |
run: hpc-codecov stack:all -o codecov.json | |
- name: Upload coverage reports to Codecov | |
if: ${{ always() }} | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |