-
Notifications
You must be signed in to change notification settings - Fork 3
102 lines (83 loc) · 2.3 KB
/
test.yml
File metadata and controls
102 lines (83 loc) · 2.3 KB
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
name: Test
on:
workflow_call:
inputs:
upload:
default: false
required: false
type: boolean
test-page:
default: true
required: false
type: boolean
permissions:
contents: read
id-token: write
concurrency:
group: ${{ github.ref }}
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
- name: Check format of JSON files
run: npx -y prettier --check --parser json "data/**/*.json"
page:
runs-on: ubuntu-latest
if: inputs.test-page
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 19
- name: Install dependencies
working-directory: conformance-search
run: npm ci
- name: Test page
working-directory: conformance-search
run: |
npm run test:ci
npm run prebuild
data:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "poetry"
- name: Install dependencies
id: setup
working-directory: ./src
run: |
poetry env use "3.11"
poetry install --no-interaction
- name: Add pattern matcher
run: echo "::add-matcher::${{ github.workspace }}/.github/problem-matchers.json"
- name: Run construct
if: ${{ !cancelled() && steps.setup.conclusion == 'success' }}
working-directory: ./src
run: poetry run construct-all
- name: Run coverage
if: ${{ !cancelled() && steps.setup.conclusion == 'success' }}
working-directory: ./src
run: poetry run coverage
- name: Validate output
if: ${{ !cancelled() && steps.setup.conclusion == 'success' }}
working-directory: ./src
run: poetry run pytest -- --check-max-tb=0
- name: Upload output
if: inputs.upload
uses: actions/upload-artifact@v4
with:
name: output
path: ./src/output
retention-days: 1