-
Notifications
You must be signed in to change notification settings - Fork 14
82 lines (70 loc) · 1.78 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
pytest:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: true
matrix:
python-version: [3.9, '3.10']
config:
- {
name: "Linux",
os: ubuntu-latest
}
- {
name: "MacOSX",
os: macos-latest
}
- {
name: "Windows",
os: windows-latest
}
defaults:
run:
shell: bash
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Checkout HEXRD
uses: actions/checkout@v2
with:
repository: HEXRD/hexrd
path: hexrd
- name: Checkout HEXRDGUI
uses: actions/checkout@v2
with:
path: hexrdgui
- name: Checkout examples
uses: actions/checkout@v2
with:
repository: HEXRD/examples
path: examples
- name: Set environment variable to work around setuptools/numpy issue
run: echo 'SETUPTOOLS_USE_DISTUTILS=stdlib' >> $GITHUB_ENV
if: ${{ matrix.config.os == 'windows-latest'}}
- name: Install HEXRD
run: |
pip install .
working-directory: hexrd
- name: Install HEXRDGUI
run: |
pip install .
working-directory: hexrdgui
- name: Install requirements.txt
run: |
pip install -r tests/requirements.txt
working-directory: hexrdgui
- name: Run tests
env:
HEXRD_EXAMPLE_REPO_PATH: ${{ github.workspace }}/examples
run: |
QT_QPA_PLATFORM=offscreen pytest -s tests/
working-directory: hexrdgui