-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (58 loc) · 1.53 KB
/
ci.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
name: Pytest
on: [push]
jobs:
check_json:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Check JSON
run: |
file_path="available.json"
if [ -f "$file_path" ]; then
if jq . "$file_path" >/dev/null 2>&1; then
echo "JSON file is valid."
else
echo "JSON file is not valid."
exit 1
fi
else
echo "JSON file does not exist."
exit 1
fi
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install schema module
run: |
python -m pip install --upgrade pip
python -m pip install setuptools
python -m pip install -e .
python -m pip install -r requirements.txt
- name: Run pytest
run: |
cd hdr_schemata/tests/
pytest test_gwdm.py
pytest test_hdruk.py
pytest test_schemaOrg.py
deploy:
runs-on: ubuntu-latest
needs: test
if: success() && github.ref == 'refs/heads/master'
steps:
- uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: actions/checkout@v2
with:
submodules: "recursive"
- run: pip3 install -r requirements.txt
- name: deploy
run: |
mkdocs gh-deploy --force