-
-
Notifications
You must be signed in to change notification settings - Fork 17
54 lines (54 loc) · 1.62 KB
/
ci-workflow.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
name: test-suite
on: [push, pull_request]
jobs:
test-template-and-lint:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v4
with:
python-version: '3.8'
architecture: 'x64'
- name: Install makita
run: |
pip install .
- name: Install ruff
run: |
pip install ruff
- name: set up environment
run: |
mkdir tmp
cd tmp
mkdir -p basic/data
mkdir -p arfi/data
mkdir -p multimodel/data
cp ../.github/workflows/test_data/labels.csv basic/data/labels.csv
cp ../.github/workflows/test_data/labels.csv arfi/data/labels.csv
cp ../.github/workflows/test_data/labels.csv multimodel/data/labels.csv
- name: Test makita templates
run: |
cd tmp/basic
asreview makita template basic | tee output.txt
grep -q "ERROR" output.txt && exit 1 || true
cd ../arfi
asreview makita template arfi | tee output.txt
grep -q "ERROR" output.txt && exit 1 || true
cd ../multimodel
asreview makita template multimodel | tee output.txt
grep -q "ERROR" output.txt && exit 1 || true
- name: Run ShellCheck
if: ${{ matrix.os != 'windows-latest' }}
uses: ludeeus/action-shellcheck@master
with:
scandir: './tmp'
env:
SHELLCHECK_OPTS: -e SC2148
- name: Generate makita scripts
run: |
asreview makita add-script --all
- name: Lint python with ruff
run: |
ruff .