-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (47 loc) · 1.43 KB
/
ci-main.yml
File metadata and controls
60 lines (47 loc) · 1.43 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
49
50
51
52
53
54
55
56
57
58
59
60
name: CI – Main Branch
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
concurrency:
group: ci-main-${{ github.ref }}
cancel-in-progress: true
env:
PYTHON_VERSION: "3.12"
MPLBACKEND: Agg
ASYNCFLOW_RUN_SYSTEM_TESTS: "1"
jobs:
all-checks:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'
- uses: actions/cache@v3
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
- name: Install Poetry & deps
run: |
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"
poetry config virtualenvs.create false
poetry install --with dev --no-interaction
- name: Ruff (lint)
run: poetry run ruff check src tests
- name: MyPy (type-check)
run: poetry run mypy src tests
- name: All tests (unit + integration + system)
run: poetry run pytest --disable-warnings --cov=asyncflow --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: coverage.xml
flags: tests
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}