-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (37 loc) · 1.01 KB
/
test-code.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
name: "Test & Lint"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allow manual triggering
workflow_dispatch:
jobs:
test-python:
runs-on: ubuntu-latest
steps:
- name: "Checkout source code"
uses: actions/checkout@v4
- name: "Install Python"
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip
pip install -r src/requirements.txt
pip install -r src/dev-requirements.txt
- name: "Run ruff format"
run: |
ruff format src/ tests/
- name: "Run ruff check"
run: |
ruff check src/ tests/
- name: "Run tests"
run: |
pytest --cov=src --cov-report=xml --cov-report=term-missing
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}