-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (58 loc) · 1.68 KB
/
test.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
name: Test
on:
# Run each time we push and pull requests
push:
pull_request:
# Cron job
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule
schedule:
# https://crontab.guru/#0_0_1_*_*
- cron: "0 0 1 * *"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
# As we are running on different environments, we are splitting the jobs
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobs
local:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install setuptools_scm pytest-cov matplotlib>=2.2 pytest \
pillow
pip install .
- name: Test local run
run: |
pytest -v --cov=./
# - name: Upload to codecov
# run: |
# pip install codecov
# codecov
lint:
runs-on: ubuntu-latest
if: always()
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# - name: Lint with flake8
# run: |
# pip install flake8
# flake8 && echo "flake8 successful"