Skip to content

Correct integration test suite invocation #86

Correct integration test suite invocation

Correct integration test suite invocation #86

################################################################################
### GitHub Actions curation providing quality assurance for Haskell projects
###
name: 'PHAGE Integration Test CI'
################################################################################
### Actions Configuration
###
defaults:
run:
shell: bash
env:
PROJECTFILE: --project-file=cfg/cabal.project.integration
TESTDETAILS: --test-show-details=streaming
TESTOPTIONS: --test-options="--timeout=30s"
THISMAINEXE: PhyGraph:phyg
THISTESTEXE: PHAGE-integration-tests:integration-tests
on:
# Build every pull request, to check for regressions.
pull_request:
# Build on branch updates
push:
branches: [ github-ci ]
################################################################################
### Actions: Curation
###
jobs:
################################################################################
### Check that all test cases pass
###
testing:
# NOTE:
# Do *not* include macOS in *any* benchmarking/testing build matrix!
# Only include macOS in build matrices checking for compilation success.
# - macOS consumes x10 the free Linux CI minutes
# - macOS bills at x10 the paid Linux CI minute rate
#
name: 'Test: Integration'
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: 'Clone Project'
uses: actions/checkout@v3
- name: 'Setup Haskell'
uses: haskell/actions/setup@v2
with:
ghc-version: 9.2
cabal-version: 3.6
- name: 'Cabal - Configure'
run: |
cabal update ${PROJECTFILE}
cabal clean ${PROJECTFILE}
cabal freeze ${PROJECTFILE}
- name: 'Cabal - Cache'
uses: actions/cache@v3
with:
path: |
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
# restore keys is a fall back when the freeze plan is different
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-
- name: 'Cabal - Build'
run: |
cabal build ${THISMAINEXE} ${THISTESTEXE} ${PROJECTFILE} --only-dependencies
- name: 'Cabal - Integration Tests'
run: |
cabal test ${THISTESTEXE} ${PROJECTFILE} ${TESTDETAILS} ${TESTOPTIONS}
- name: Send mail on failure
if: ${{ failure() }}
uses: dawidd6/action-send-mail@v3
with:
# Mail server settings
ignore_cert: true
secure: true
server_address: smtp.domain.com
server_port: 465
# Sender credentials
username: ${{ secrets.EMAIL_USERNAME }}
password: ${{ secrets.EMAIL_PASSWORD }}
# Recipient & email information
to: crowley@amnh.org
cc: wheeler@amnh.org
from: PHAGE ρbit
subject: "PHAGE CI Failure: Integration Test-suite - job ${{ github.job }}"
body: "The continuous integration performed by GitHub Workflows has failed!\n\nInspect job ${{ github.job.name }} numbered ${{ github.job }} at:\n\n https://github.com/${{ github.repository }}actions.\n\n\nVigilantly,\n ~ PHAGE ρbit"