32 lines
744 B
YAML
32 lines
744 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: main
|
|
pull_request:
|
|
branches: main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4.3.1
|
|
with:
|
|
python-version: '3.10'
|
|
- name: Install Poetry
|
|
run: pip install poetry
|
|
- name: Init environment
|
|
run: poetry install
|
|
- name: Unit tests
|
|
run: poetry run coverage run --branch -m pytest tests
|
|
- name: Write coverage report
|
|
run: poetry run coverage xml
|
|
- name: Send coverage to Codecov
|
|
uses: codecov/codecov-action@v4.3.0
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
fail_ci_if_error: true
|