|
a |
|
b/.github/workflows/test.yml |
|
|
1 |
name: CI testing |
|
|
2 |
|
|
|
3 |
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows |
|
|
4 |
on: |
|
|
5 |
# Trigger the workflow on push or pull request, but only for the main branch |
|
|
6 |
push: |
|
|
7 |
branches: |
|
|
8 |
- main |
|
|
9 |
pull_request: |
|
|
10 |
branches: |
|
|
11 |
- main |
|
|
12 |
|
|
|
13 |
jobs: |
|
|
14 |
tests: |
|
|
15 |
runs-on: ${{ matrix.os }} |
|
|
16 |
strategy: |
|
|
17 |
fail-fast: false |
|
|
18 |
matrix: |
|
|
19 |
os: [ubuntu-latest, macOS-latest, windows-latest] |
|
|
20 |
python-version: [3.8, 3.9] |
|
|
21 |
|
|
|
22 |
# Timeout: https://stackoverflow.com/a/59076067/4521646 |
|
|
23 |
timeout-minutes: 35 |
|
|
24 |
|
|
|
25 |
steps: |
|
|
26 |
- uses: actions/checkout@v2 |
|
|
27 |
- name: Set up Python ${{ matrix.python-version }} |
|
|
28 |
uses: actions/setup-python@v2 |
|
|
29 |
with: |
|
|
30 |
python-version: ${{ matrix.python-version }} |
|
|
31 |
|
|
|
32 |
# Github Actions: Run step on specific OS: https://stackoverflow.com/a/57948488/4521646 |
|
|
33 |
- name: Setup macOS |
|
|
34 |
if: runner.os == 'macOS' |
|
|
35 |
run: | |
|
|
36 |
brew install libomp # https://github.com/pytorch/pytorch/issues/20030 |
|
|
37 |
|
|
|
38 |
- name: Install dependencies |
|
|
39 |
run: | |
|
|
40 |
pip install tox virtualenv setuptools |
|
|
41 |
shell: bash |
|
|
42 |
|
|
|
43 |
- name: Tests |
|
|
44 |
run: | |
|
|
45 |
tox -e build |
|
|
46 |
tox |