-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (55 loc) · 1.76 KB
/
Copy pathci.yml
File metadata and controls
59 lines (55 loc) · 1.76 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
name: CI
on:
push:
branches: [master, main]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint and type-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.12"
- name: Install
run: |
python -m pip install --upgrade pip
pip install -e '.[dev]'
- name: ruff
run: ruff check snowflake_sql_api tests
- name: black
run: black --check snowflake_sql_api tests
- name: mypy
run: mypy snowflake_sql_api
test:
name: Test (py${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: |
python -m pip install --upgrade pip
pip install -e '.[dev]'
- name: pytest
# Use `coverage run` (not `pytest --cov`) so tracing starts before the
# package's own pytest11 plugin (snowflake_sql_api.testing) is imported;
# otherwise import-time lines read as uncovered. The 89% gate lives in
# pyproject.toml [tool.coverage.report] fail_under.
run: |
coverage run -m pytest
coverage report