Skip to content

CI

CI #1230

Workflow file for this run

name: CI
on:
push:
branches:
- 'master'
- '[0-9].[0-9]+' # matches to backport branches, e.g. 3.6
tags: [ 'v*' ]
pull_request:
branches:
- 'master'
- '[0-9].[0-9]+'
schedule:
- cron: '0 6 * * *' # Daily 6AM UTC build
jobs:
lint:
name: Linter
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Install dependencies
uses: py-actions/py-dependency-install@v3
with:
path: requirements.txt
- name: Install Itself
run: |
pip install -e .
- name: Run lint
run: |
make lint
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Install dependencies
uses: py-actions/py-dependency-install@v3
with:
path: requirements.txt
- name: Install Itself
run: |
pip install -e .
- name: Run unittests
run: |
pytest tests
python -m coverage xml
- name: Upload coverage
uses: codecov/codecov-action@v3.1.0
with:
file: ./coverage.xml
fail_ci_if_error: false
check: # This job does nothing and is only used for the branch protection
if: always()
name: "Tests check"
needs: [lint, test]
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}