-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.59 KB
/
Copy pathci.yml
File metadata and controls
53 lines (50 loc) · 1.59 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
name: CI
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
jobs:
lint-and-unit:
name: Lint, typecheck, unit + contract tests (no network)
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install package with dev dependencies
run: pip install -e .[dev]
- name: ruff
run: ruff check .
- name: mypy
run: mypy awsysco
- name: pytest (unit + contract, no network)
run: pytest -q -m "not integration"
- name: examples compile
run: bash examples/check_syntax.sh
integration:
name: Staging integration tests
runs-on: ubuntu-latest
needs: lint-and-unit
if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install package with dev dependencies
run: pip install -e .[dev]
- name: pytest (integration, requires AWSYS_API_KEY)
env:
AWSYS_API_KEY: ${{ secrets.AWSYS_API_KEY }}
AWSYS_BASE_URL: ${{ vars.AWSYS_BASE_URL || 'https://staging.awsys.co' }}
run: |
if [ -z "$AWSYS_API_KEY" ]; then
echo "AWSYS_API_KEY secret not set — skipping integration tests."
exit 0
fi
pytest -q -m integration