Skip to content

Lint and test

Lint and test #143

Workflow file for this run

name: Lint and test
'on':
workflow_dispatch:
inputs:
extra_resolve_options:
description: Extra Resolve Options
required: false
schedule:
- cron: 0 1 * * *
push:
branches:
- master
pull_request:
jobs:
test_and_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: 'python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
'
- name: Lint with flake8
uses: suo/flake8-github-action@releases/v1
with:
checkName: test_and_lint
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Test with pytest
run: 'if [ -f tests/requirements.txt ]; then pip install -r tests/requirements.txt;
fi
pytest
'
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true