-
Notifications
You must be signed in to change notification settings - Fork 10
61 lines (57 loc) · 1.73 KB
/
ci.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: ci
on:
push:
branches:
- '*'
pull_request:
branches:
- master
jobs:
lint:
# runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install pytest pytest-mpl black flake8 isort[colors] flake8-colors
- name: Check code
run: |
isort --check --color .
black -l 92 --check .
flake8 .
build:
# runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install pip, setuptools and testing tools
run: |
python3 -m pip install --upgrade pip setuptools wheel
pip3 install pytest pytest-mpl pytest-cov
- name: Install package and dependencies
run: |
#pip3 install -r requirements.txt
pip3 install -e .
- name: Test with pytest
run: |
pytest --mpl --mpl-results-path=tests/results --cov=symbeam/ --cov-report=xml tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests