Skip to content

lint

lint #90

Workflow file for this run

# GitHub Continuous Integration Configuration
name: CI
# Define conditions for when to run this action
on:
pull_request: # Run on all pull requests
push: # Run on all pushes to master
branches:
- main
- develop
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs. Each job has an id, for
# example, one of our jobs is "lint"
jobs:
test:
name: Tests ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
# Define OS and Python versions to use. 3.x is the latest minor version.
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.x"]
os: [ubuntu-latest]
# Sequence of tasks for this job
steps:
# Check out latest code
# Docs: https://github.com/actions/checkout
- name: Checkout code
uses: actions/checkout@v2
# Set up Python
# Docs: https://github.com/actions/setup-python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Install dependencies
# https://github.com/ymyzk/tox-gh-actions#workflow-configuration
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install coverage tox tox-gh-actions
# Run tests
# https://github.com/ymyzk/tox-gh-actions#workflow-configuration
- name: Run tests
run: tox
- name: Combine coverage
run: coverage xml
# Upload coverage report
# https://github.com/codecov/codecov-action
- name: Upload coverage report
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true