-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (57 loc) · 1.95 KB
/
tests.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
name: Tests
on:
push:
pull_request:
workflow_dispatch:
# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["windows-latest", "ubuntu-latest", "macos-latest"]
python-version: ["3.8", "3.9", "3.10"]
exclude:
- os: "macos-latest"
python-version: "3.8"
- os: "macos-latest"
python-version: "3.10"
env:
PYTHON_VERSION: ${{ matrix.python-version }}
PARALLEL: "true"
COVERAGE: "true"
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
fetch-depth: 0 # Needed by codecov.io
- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
channel-priority: strict
python-version: ${{ matrix.python-version }}
environment-file: continuous_integration/environment-${{ matrix.python-version }}.yaml
activate-environment: test-environment
auto-activate-base: false
- name: Hack around https://github.com/ipython/ipython/issues/12197
# This upstream issue causes an interpreter crash when running
# test_base.py::test_tokenize_object_with_recursion_error_returns_uuid
shell: bash -l {0}
if: ${{ matrix.os == 'windows-latest' && matrix.python-version == '3.9' }}
run: mamba uninstall ipython
- name: Install
shell: bash -l {0}
run: source continuous_integration/scripts/install.sh
- name: Run tests
shell: bash -l {0}
run: source continuous_integration/scripts/run_tests.sh
- name: Coverage
uses: codecov/codecov-action@v1