76 lines (67 loc) · 2.45 KB
/
extras.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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Build and run test extras
on:
push:
branches: [ "master", "beta" ]
#pull_requests
# branches: [ "master", "develop", "beta" ]
# Allow running manually from Actions tab
workflow_dispatch:
env:
SKIP_DEAP: 1
NOSE_VERBOSE: 2
NOSE_WITH_TIMER: 1
NOSE_WITH_ID: 1
NOSE_REDNOSE: 1
NOSE_WITH_COVERAGE: 1
NOSE_COVER_PACKAGE: "pygsti"
NOSE_PROCESSES: -1
NOSE_NOPATH: ""
NOSE_PROCESS_TIMEOUT: 2400
NOSE_WHERE: "test/test_packages/"
jobs:
test_extras: # On stable branches, run extended tests
runs-on: ubuntu-18.04
strategy:
fail-fast: false # Finish all tests even if one fails
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
nose-tests:
- "algorithms algorithmsb"
- "report reportb"
- "drivers objects tools iotest optimize construction extras"
# - "mpi" # Fails in GitHub Actions, passes locally but doesn't terminate threads properly
steps:
- uses: actions/checkout@v2
- name: Set up installation environment
run: |
./.github/ci-scripts/before_install.sh
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip packages
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}-${{ hashFiles('**/*requirements.txt') }}
- name: Install package
run: |
python -m pip install --upgrade pip
# see https://github.com/cvxgrp/cvxpy/issues/968 for numpy version
python -m pip install "numpy>=1.16.0"
# Cython must be pre-installed to build native extensions on pyGSTi install
python -m pip install cython
python -m pip install wheel
# Installing with -e to keep installation local (for NOSE_NOPATH)
# but still compile Cython extensions
python -m pip install -e .[testing]
python -m pip freeze
- name: Run test_packages ${{ matrix.nose-tests }}
env:
NOSETESTS: ${{ matrix.nose-tests }}
run: |
python -Ic "import pygsti; print(pygsti.__version__); print(pygsti.__path__)"
echo "nosetests: $NOSETESTS"
nosetests $NOSETESTS