-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1015 Bytes
/
Copy pathtests.yml
File metadata and controls
34 lines (32 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Run tests and upload coverage to Codecov 📊
on:
push:
branches-ignore:
- main
workflow_dispatch:
jobs:
release:
name: Run tests and upload coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract Python version
id: get-python-version
run: |
echo "PYTHON_VERSION=$(grep 'PYTHON_VERSION' Makefile.env | sed 's/PYTHON_VERSION=//')" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
uses: Gr1N/setup-poetry@v8
- name: Install dependencies
run: poetry install
- name: Run pytest
run: poetry run pytest --cov tests/ --cov-report=json
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}