-
Notifications
You must be signed in to change notification settings - Fork 25
55 lines (51 loc) · 1.24 KB
/
main.yaml
File metadata and controls
55 lines (51 loc) · 1.24 KB
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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: 'latest'
python-version: 3.10.0
activate-environment: rexmex-ci
- run: conda --version
- run: which python
- name: Run installation.
run: |
pip install codecov
pip install pytest
pip install tox
python setup.py install
- name: Run code quality tests
run: |
tox -e flake8
- name: Run type checking
run: |
tox -e mypy
- name: Install main package
run: |
pip install -e .[test]
- name: Run test-suite
run: |
python -m pytest
- name: Generate coverage report
if: success()
run: |
pip install coverage
coverage run -m pytest
coverage xml
- name: Upload coverage report to codecov
uses: codecov/codecov-action@v1
if: success()
with:
file: coverage.xml