Skip to content

Commit 25f7b35

Browse files
committed
test: ✅ Add pytest to CI workflow.
1 parent 68d4c3b commit 25f7b35

File tree

10 files changed

+3729
-3036
lines changed

10 files changed

+3729
-3036
lines changed

Diff for: .github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
## https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment
2727
# environment:
2828
# name: pypi
29-
# url: https://pypi.org/project/"ticketswap-tap-dbt-artifacts"/${{ steps.baipp.outputs.package_version }}
29+
# url: https://pypi.org/project/ticketswap-tap-dbt-artifacts/${{ steps.baipp.outputs.package_version }}
3030
if: startsWith(github.ref, 'refs/tags/')
3131
steps:
3232
- uses: actions/download-artifact@v4

Diff for: .github/workflows/ci.yml

+64-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,76 @@
1-
### A CI workflow template that runs linting and python testing
1+
### A CI workflow template that runs linting and Python testing
22
### TODO: Modify as needed or as desired.
33

44
name: Test tap-db-artifacts
55

66
on:
77
pull_request:
88
types: ["opened", "synchronize", "reopened"]
9+
branches: [main]
10+
paths:
11+
- .github/workflows/test.yml
12+
- tap_dbt_artifacts/**
13+
- tests/**
14+
- pyproject.toml
15+
- uv.lock
16+
- tox.ini
17+
workflow_dispatch:
18+
19+
env:
20+
FORCE_COLOR: 1
921

1022
jobs:
1123
linter:
1224
runs-on: ubuntu-latest
1325
steps:
14-
- uses: actions/checkout@v4
15-
- uses: chartboost/ruff-action@v1
26+
- name: checkout
27+
uses: actions/checkout@v4
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version-file: "pyproject.toml"
33+
34+
- name: Install dependencies
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install ruff
38+
39+
- name: Run Ruff (Linting)
40+
run: ruff check .
41+
42+
pytest:
43+
runs-on: ubuntu-latest
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
python-version:
48+
- "3.9"
49+
- "3.10"
50+
- "3.11"
51+
- "3.12"
52+
steps:
53+
- name: checkout
54+
uses: actions/checkout@v4
55+
56+
- name: Install the latest version of uv
57+
uses: astral-sh/setup-uv@v5
58+
with:
59+
version: "latest"
60+
enable-cache: true
61+
62+
- name: Set up Python ${{ matrix.python-version }}
63+
uses: actions/setup-python@v5
64+
with:
65+
python-version: ${{ matrix.python-version }}
66+
67+
- name: Install requirements
68+
run: |
69+
uv pip sync requirements.txt --system
70+
uv tool install meltano
71+
uv tool install pytest
72+
uv tool install tox
73+
74+
- name: Run Tox
75+
run: |
76+
tox -e $(echo py${{ matrix.python-version }} | tr -d .)

Diff for: requirements.txt

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile pyproject.toml -o requirements.txt
3+
appdirs==1.4.4
4+
# via fs
5+
attrs==25.1.0
6+
# via
7+
# jsonschema
8+
# referencing
9+
backoff==2.2.1
10+
# via singer-sdk
11+
certifi==2025.1.31
12+
# via requests
13+
charset-normalizer==3.4.1
14+
# via requests
15+
click==8.1.8
16+
# via singer-sdk
17+
fs==2.4.16
18+
# via singer-sdk
19+
fsspec==2025.2.0
20+
# via singer-sdk
21+
idna==3.10
22+
# via requests
23+
importlib-metadata==8.6.1
24+
# via singer-sdk
25+
inflection==0.5.1
26+
# via singer-sdk
27+
joblib==1.4.2
28+
# via singer-sdk
29+
jsonpath-ng==1.7.0
30+
# via singer-sdk
31+
jsonschema==4.23.0
32+
# via singer-sdk
33+
jsonschema-specifications==2024.10.1
34+
# via jsonschema
35+
packaging==24.2
36+
# via singer-sdk
37+
ply==3.11
38+
# via jsonpath-ng
39+
python-dotenv==1.0.1
40+
# via singer-sdk
41+
pyyaml==6.0.2
42+
# via singer-sdk
43+
referencing==0.36.2
44+
# via
45+
# jsonschema
46+
# jsonschema-specifications
47+
# singer-sdk
48+
requests==2.32.3
49+
# via singer-sdk
50+
rpds-py==0.22.3
51+
# via
52+
# jsonschema
53+
# referencing
54+
setuptools==70.3.0
55+
# via
56+
# fs
57+
# singer-sdk
58+
simpleeval==1.0.3
59+
# via singer-sdk
60+
simplejson==3.19.3
61+
# via singer-sdk
62+
singer-sdk==0.44.2
63+
# via ticketswap-tap-dbt-artifacts (pyproject.toml)
64+
six==1.17.0
65+
# via fs
66+
sqlalchemy==2.0.37
67+
# via singer-sdk
68+
typing-extensions==4.12.2
69+
# via
70+
# referencing
71+
# singer-sdk
72+
# sqlalchemy
73+
urllib3==2.3.0
74+
# via requests
75+
zipp==3.21.0
76+
# via importlib-metadata

0 commit comments

Comments
 (0)