-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (45 loc) · 1.35 KB
/
testing.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
name: pyscal-testing
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-13, windows-latest]
python-version: ['3.10', '3.11']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v1
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('.ci_support/environment.yml') }}
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: pyscal-test
channel-priority: strict
environment-file: .ci_support/environment.yml
python-version: ${{ matrix.python-version }}
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: run tests
shell: bash -l {0}
run: |
pip install -e .
pip install pytest
pip install pytest-cov
pytest --cov-report=xml --cov=pyscal tests/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: coverage.xml
name: codecov-umbrella
fail_ci_if_error: false