Merge pull request #19 from boutproject/mpl390 #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |