-
Notifications
You must be signed in to change notification settings - Fork 5
66 lines (54 loc) · 1.55 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
name: tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
Test:
name: ${{ matrix.os }}, ${{ matrix.env }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
env:
- ci/envs/latest.yml
steps:
- uses: actions/checkout@v2
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
auto-activate-base: false
activate-environment: test
environment-file: ${{ matrix.env }}
channel-priority: strict
- name: Install cityImage
shell: bash -l {0}
run: python setup.py install
- name: Check environment
shell: bash -l {0}
run: |
conda info
conda list
- name: Test cityImage
shell: bash -l {0}
run: |
pytest -v --color=yes --cov-config .coveragerc --cov=cityImage --cov-append --cov-report term-missing --cov-report xml tests
- name: Upload coverage to Codecov
if: success()
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
flags: unittests
name: codecov-python
# - name: Test documentation
# shell: bash -l {0}
# if: contains(matrix.env, 'latest.yml') && contains(matrix.os, 'ubuntu')
# run: |
# ci/envs/test_documentation.sh
# - name: Black
# shell: bash -l {0}
# run: |
# black --check .