forked from clearlydefined/operations
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (56 loc) · 2.04 KB
/
integration-test.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
name: Integration Test
on:
workflow_dispatch:
inputs:
baseFolderPath:
description: 'Base folder path for diffs'
required: true
default: 'diffs'
dynamicCoordinates:
description: 'Array of booleans for dynamic coordinates (e.g., [true, false])'
required: true
default: '[true, false]'
skipHarvest:
description: "Skip harvest and verify completion"
required: false
default: 'false'
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
dynamicCoordinates: ${{ fromJson(github.event.inputs.dynamicCoordinates) }}
defaults:
run:
working-directory: ./tools/integration
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version: 18
cache: 'npm'
cache-dependency-path: './tools/integration/'
- name: Install dependencies
run: npm ci
- name: Run tests on tools
run: npm test
- name: Trigger harvest and verify completion if required
if: github.event.inputs.skipHarvest == 'false' || matrix.dynamicCoordinates == 'true'
run: DYNAMIC_COORDINATES=${{ matrix.dynamicCoordinates }} npm run e2e-test-harvest
- name: Verify service functions
id: verify-service-functions
continue-on-error: true
run: DYNAMIC_COORDINATES=${{ matrix.dynamicCoordinates }} npm run e2e-test-service
- name: Generate structured diffs
run: DYNAMIC_COORDINATES=${{ matrix.dynamicCoordinates }} npm run definitions-diff ${{ github.event.inputs.baseFolderPath }}
- name: Upload diffs artifact
uses: actions/upload-artifact@v4
with:
name: diffs-${{ matrix.dynamicCoordinates == 'true' && 'dynamic' || 'static' }}
path: ./tools/integration/${{ github.event.inputs.baseFolderPath }}
- name: Mark build status
if: steps.verify-service-functions.outcome == 'failure'
run: exit 1