-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (87 loc) · 2.96 KB
/
integration-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
################################################################################
### GitHub Actions curation providing quality assurance for Haskell projects
###
name: 'Haskell Quality Assurance CI'
################################################################################
### Actions Configuration
###
defaults:
run:
shell: bash
env:
THISPACKAGE: PHANE-integration-tests
THISTESTEXE: integration-tests
on:
# Build every pull request, to check for regressions.
pull_request:
# Build when a PR is merged, to update the README's CI badge.
push:
branches: [ integration-test-development, master ]
# Build once a month, to detect missing upper bounds.
schedule:
- cron: '0 0 1 * *'
################################################################################
### Actions: Curation
###
jobs:
################################################################################
### Check that all test cases pass
###
testing:
name: 'Check: Integration Test-suite'
needs: build-min-bounds
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- ghc: 9.2
cabal: 3.6
os: ubuntu-latest
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
cabal clean
cabal freeze
- 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 --only-dependencies
cabal build $CONFIG
- name: 'Cabal - Test'
run: |
cabal run ${THISPACKAGE}:THISTESTEXE
- name: Send mail on failure
if: ${{ failure() }}
uses: dawidd6/action-send-mail@v3
with:
# Mail server settings
secure: true
server_address: smtp.domain.com
server_port: 465
# Sender credentials
username: ${{ secrets.EMAIL_USERNAME }}
password: ${{ secrets.EMAIL_PASSWORD }}
# Recipient & email information
from: PHANE ρbit
subject: "PHANE 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 ~ PHANE ρbit"