-
Notifications
You must be signed in to change notification settings - Fork 21
150 lines (119 loc) · 3.44 KB
/
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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allow job to be triggered manually.
workflow_dispatch:
# Cancel in-progress jobs when pushing to the same branch.
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
tests-backend:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [
'ubuntu-20.04',
# Don't use macOS for now, it is currently unstable, otherwise slow. -- 2022-04-19, amo
# 'macos-latest',
]
python-version: ['2.7']
defaults:
run:
shell: bash
env:
OPS_API_CONSUMER_KEY: ${{ secrets.OPS_API_CONSUMER_KEY }}
OPS_API_CONSUMER_SECRET: ${{ secrets.OPS_API_CONSUMER_SECRET }}
IFICLAIMS_API_URI: ${{ secrets.IFICLAIMS_API_URI }}
IFICLAIMS_API_USERNAME: ${{ secrets.IFICLAIMS_API_USERNAME }}
IFICLAIMS_API_PASSWORD: ${{ secrets.IFICLAIMS_API_PASSWORD }}
name: Python ${{ matrix.python-version }} on OS ${{ matrix.os }}
steps:
- name: Acquire sources
uses: actions/checkout@v3
- name: Install dependencies for Linux
if: runner.os == 'Linux'
run: |
sudo apt install --yes pdftk poppler-utils
- name: Install dependencies for macOS
if: runner.os == 'macOS'
run: |
brew install poppler
- name: Configure policy for ImageMagick
# https://stackoverflow.com/q/52998331
# https://stackoverflow.com/a/57721936
if: runner.os == 'Linux'
run: |
sudo rm /etc/ImageMagick-6/policy.xml
- name: Setup Python
uses: MatteoH2O1999/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: x64
cache: 'pip'
cache-dependency-path: 'setup.py'
- name: Setup project
run: |
pip install virtualenv
make setup-test
- name: Run tests
run: make test-coverage options="--app-cache-backend=memory"
- name: Upload coverage results to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: true
tests-docs:
runs-on: "ubuntu-20.04"
defaults:
run:
shell: bash
name: Build documentation
steps:
- name: Acquire sources
uses: actions/checkout@v3
- name: Setup Python
uses: MatteoH2O1999/setup-python@v1
with:
python-version: '2.7'
architecture: 'x64'
cache: 'pip'
cache-dependency-path: 'requirements-docs.txt'
- name: Invoke Sphinx
run: |
pip install virtualenv
make docs-html
tests-ui:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [
'ubuntu-20.04',
# Don't use macOS for now, it is currently unstable, otherwise slow. -- 2022-04-19, amo
# 'macos-latest',
]
node-version: ['11']
defaults:
run:
shell: bash
name: Node.js ${{ matrix.node-version }} on OS ${{ matrix.os }}
steps:
- name: Acquire sources
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
architecture: x64
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- name: Setup project
run: yarn install
- name: Run build
run: yarn build