-
-
Notifications
You must be signed in to change notification settings - Fork 63
67 lines (54 loc) · 1.62 KB
/
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
name: DrawBot Test Bench
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: macos-latest
steps:
- name: Set up Python 3.9
run: |
curl https://www.python.org/ftp/python/3.9.13/python-3.9.13-macosx10.9.pkg --output pythonInstaller.pkg
sudo installer -pkg pythonInstaller.pkg -target /
- name: Check python
run: |
python3 --version
python3 -c "import platform; print('macOS version:', platform.mac_ver()[0]); print('processor:', platform.processor())"
- name: Checkout
uses: actions/checkout@v1
- name: Setup Virtual Environment
run: |
python3 -m venv venv
source venv/bin/activate
python -c "import sys; print('\n'.join(sys.path))"
- name: Install dependencies
run: |
source venv/bin/activate
pip install -r ./test-requirements.txt
pip install .
pip install codecov
- name: Run tests
run: |
source venv/bin/activate
coverage run ./tests/runAllTests.py
- name: Storing Test Data Artifacts
if: failure()
uses: actions/upload-artifact@master
with:
name: DrawBot Temp Data Results
path: ./tests/tempTestData
- name: Building Test Differences
if: failure()
run: |
source venv/bin/activate
python ./tests/differenceBuilder.py ./tests/tempTestData ./tests/differences.pdf
- name: Storing Test Differences
if: failure()
uses: actions/upload-artifact@master
with:
name: DrawBot Test Differences
path: ./tests/differences.pdf