-
Notifications
You must be signed in to change notification settings - Fork 361
130 lines (124 loc) · 5.75 KB
/
integration_tests.yml
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: 'Integration Tests'
#This github action runs all of Cromwell's integration tests.
# This is what shows up in the github workflows page as the title. Using github ternary syntax & format() function.
run-name: ${{ github.event_name == 'schedule' && 'Nightly Integration Testing' || format('{0} Integration Testing', github.actor) }}
#What will trigger the workflow to run.
on:
workflow_dispatch: #Manual trigger from GitHub UI
push:
schedule:
- cron: '0 0 * * 1-5'
merge_group:
permissions:
contents: read
concurrency:
# Don't run this workflow concurrently on the same branch
group: ${{ github.workflow }}-${{ github.ref }}
# For PRs, don't wait for completion of existing runs, cancel them instead
cancel-in-progress: ${{ github.ref != 'develop' }}
jobs:
integration-tests:
strategy:
fail-fast: false #disabling fail-fast means that even if one test fails, the others will still try to complete.
#Each entry below is a single integration test that lives in /src/ci/bin/.
#Each will be launched on its own runner so they can occur in parallel.
#Friendly names are displayed on the Github UI and aren't used anywhere else.
matrix:
# Batch test fixes to land later
include:
- build_type: centaurGcpBatch
build_mysql: 5.7
friendly_name: Centaur GCP Batch with MySQL 5.7
- build_type: centaurPapiV2beta
build_mysql: 5.7
friendly_name: Centaur Papi V2 Beta with MySQL 5.7
- build_type: centaurPapiV2betaRestart
build_mysql: 5.7
friendly_name: Centaur Papi V2 Beta (restart)
- build_type: dbms
friendly_name: DBMS
- build_type: centaurTes
build_mysql: 5.7
friendly_name: Centaur TES with MySQL 5.7
- build_type: centaurLocal
build_mysql: 5.7
friendly_name: Centaur Local with MySQL 5.7
- build_type: checkPublish
friendly_name: Check Publish
- build_type: centaurAws
build_mysql: 5.7
friendly_name: Centaur AWS with MySQL 5.7
- build_type: centaurDummy
build_mysql: 5.7
friendly_name: Centaur Dummy with MySQL 5.7
- build_type: centaurHoricromtalPapiV2beta
build_mysql: 5.7
friendly_name: Centaur Horicromtal PapiV2 Beta with MySQL 5.7
- build_type: horicromtalDeadlock
friendly_name: Horicromtal Deadlock
- build_type: singleWorkflowRunner
friendly_name: Single Workflow Runner
- build_type: centaurLocal
build_mariadb: 10.3
friendly_name: Centaur Local with MariaDB 10.3
- build_type: centaurLocal
build_postgresql: 11.3
friendly_name: Centaur Local with PostgreSQL 11.3
- build_type: centaurEngineUpgradeLocal
build_mysql: 5.7
friendly_name: Centaur Engine Upgrade Local with MySQL 5.7
- build_type: referenceDiskManifestBuilderApp
friendly_name: Reference Disk Manifest Builder App
- build_type: centaurSlurm
build_mysql: 5.7
friendly_name: "Centaur Slurm with MySQL 5.7"
- build_type: centaurBlob
build_mysql: 5.7
friendly_name: Centaur Blob
name: ${{ matrix.friendly_name }}
env:
BUILD_NAME: ${{ matrix.build_type }}
BUILD_TYPE: ${{ matrix.build_type }} #intentionally duplicated variable
BUILD_MYSQL: ${{ matrix.build_mysql }}
BUILD_POSTGRESQL: ${{ matrix.build_postgresql }}
BUILD_MARIADB: ${{ matrix.build_mariadb }}
VAULT_ROLE_ID: ${{ secrets.VAULT_ROLE_ID_CI }}
VAULT_SECRET_ID: ${{ secrets.VAULT_SECRET_ID_CI }}
AZURE_CLIENT_ID: ${{ secrets.VAULT_AZURE_CENTAUR_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.VAULT_AZURE_CENTAUR_CLIENT_SECRET }}
AZURE_TENANT_ID: ${{ secrets.VAULT_AZURE_CENTAUR_TENANT_ID }}
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v3 # checkout the cromwell repo
with:
ref: ${{ inputs.target-branch }}
- uses: ./.github/set_up_cromwell_action #This github action will set up git-secrets, caching, java, and sbt.
with:
cromwell_repo_token: ${{ secrets.BROADBOT_GITHUB_TOKEN }}
#This script bascially just looks up another script to run, assuming that the other script's filename is:
#src/ci/bin/test${BUILD_TYPE}.sh. The first letter of the BUILD_TYPE is automatically capitalized when looking.
- name: Run Integration Test
shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"' #See comment below
run: |
set -e
echo Running test.sh
./src/ci/bin/test.sh
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false # Tolerate missing codecov reports, since not all suites generate them.
# always() is some github magic that forces the following step to run, even when the previous fails.
# Without it, the if statement won't be evaluated on a test failure.
- uses: ravsamhq/notify-slack-action@v2
if: always() && github.ref == 'refs/heads/develop' #only report on failures against develop.
with:
status: ${{ job.status }}
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
#The "shell: ..."" line is a way to force the Github Action Runner to use a bash shell that thinks it has a TTY.
#The issue and solution are described here: https://github.com/actions/runner/issues/241#issuecomment-842566950
#This is only needed for ReferenceDiskManifestBuilderApp test.
#This test uses fancy colors in the output, which likely causes the problem.
#See WX-938.