-
Notifications
You must be signed in to change notification settings - Fork 8
48 lines (45 loc) · 1.39 KB
/
unittests.yml
File metadata and controls
48 lines (45 loc) · 1.39 KB
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
47
48
name: unittests
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
build:
runs-on: "ubuntu-latest"
strategy:
fail-fast: true
max-parallel: 1
steps:
- uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Install dependencies
run: uv sync --frozen --all-extras
- name: Format with ruff
run: uv run ruff format --diff
- name: Lint with ruff
run: uv run ruff check --diff
- name: Type check with pyright
run: uv run pyright
- name: Test API
run: |
uv run pytest -cov-report=xml --cov=geckoterminal_api tests/test_api.py -v
- name: Test Exceptions and Validation
run: |
uv run pytest -cov-report=xml --cov=geckoterminal_api tests/test_exceptions.py --cov-append -v
uv run pytest -cov-report=xml --cov=geckoterminal_api tests/test_validation.py --cov-append -v
- name: Sleep for 60 seconds
run: sleep 60s
shell: bash
- name: Test Async API
run: |
uv run pytest -cov-report=xml --cov=geckoterminal_api tests/test_async_api.py --cov-append -v
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}