-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathregression-test-downstream-repo.yaml
61 lines (61 loc) · 1.98 KB
/
regression-test-downstream-repo.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
name: Run Regression Tests
on:
pull_request:
branches: [ '**' ]
workflow_dispatch:
inputs:
underlays:
description: 'Comma-separated list of underlays to test (e.g. cmssynpuf,aouSR2019q4r4)'
required: true
default: cmssynpuf,aouSR2019q4r4
env:
DEFAULT_UNDERLAYS: cmssynpuf,aouSR2019q4r4
TANAGRA_UNDERLAY_FILES: cmssynpuf_verily,aouSR2019q4r4_verily
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13.1
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: Initialize Postgres DB
env:
PGPASSWORD: postgres
run: psql -h 127.0.0.1 -U postgres -f ./tanagra/service/local-dev/local-postgres-init.sql
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: v1-${{ runner.os }}-gradle-${{ hashfiles('**/gradle-wrapper.properties') }}-${{ hashFiles('**/*.gradle') }}
restore-keys: v1-${{ runner.os }}-gradle-${{ hashfiles('**/gradle-wrapper.properties') }}
- name: Gradle Run Regression Tests Only
run: |
mkdir -p rendered/
echo "$GHA_SA_KEY" > rendered/gha_sa_key.json
export GOOGLE_APPLICATION_CREDENTIALS=$PWD/rendered/gha_sa_key.json
./tanagra/gradlew -p tanagra service:regressionTests -PregressionTestUnderlays="${UNDERLAYS:-$DEFAULT_UNDERLAYS}" --scan
env:
DBMS: postgresql
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GHA_SA_KEY: ${{ secrets.GCP_SA_KEY }}
UNDERLAYS: ${{ github.event.inputs.underlays }}