Skip to content

Commit

Permalink
break out test jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
xavdid-stripe committed Jan 13, 2025
1 parent b9df5d4 commit c9daf7f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ jobs:
run: just lint
- name: fmtcheck
run: just format-check
- name: typecheck
run: |
set -eox
for minor in {6..12}; do
just ci-pyright2 $minor
done
build:
name: Build
Expand Down Expand Up @@ -105,12 +112,12 @@ jobs:
- uses: stripe/openapi/actions/stripe-mock@master

- name: "Install deps"
run: just install
- name: Typecheck with pyright
run: just ci-pyright ${{ matrix.python.version }}
# Skip typecheking in pypy legs
if: ${{ !contains(matrix.python.version, 'pypy') }}
- name: "Install test deps"
run: just test-install
# - name: Typecheck with pyright
# run: just ci-pyright ${{ matrix.python.version }}
# # Skip typecheking in pypy legs
# if: ${{ !contains(matrix.python.version, 'pypy') }}

- name: Test with pytest
run: just test
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ venv: $(VENV_NAME)/bin/activate

$(VENV_NAME)/bin/activate: setup.py requirements.txt
@test -d $(VENV_NAME) || $(PYTHON) -m venv --clear $(VENV_NAME)
${VENV_NAME}/bin/python --version
${VENV_NAME}/bin/python -m pip install -r requirements.txt
@touch $(VENV_NAME)/bin/activate

Expand Down
13 changes: 12 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ _default:
install: venv
python -m pip install -r requirements.txt --disable-pip-version-check {{ if is_dependency() == "true" {"--quiet"} else {""} }}

# install deps for unit tests
test-install: venv
python -I -m pip install -r test-requirements.txt

test *args: install
# configured in pytest.ini
pytest {{ args }}
Expand All @@ -31,9 +35,16 @@ pyright:
ci-pyright py_version:
python{{py_version}} --version
ls venv/bin
pyright --pythonversion {{ py_version }}
# pyright --pythonversion {{ py_version }}
python{{py_version}} -m pyright --pythonversion {{ py_version }}

[no-quiet]
ci-pyright2 minor_py_version:
# python3.{{py_version}} --version
# ls venv/bin
# pyright --pythonversion {{ py_version }}
pyright --pythonversion 3.{{ py_version }}

format:
ruff format . --quiet

Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ commands =
mypy: mypy {posargs}
deps =
-r requirements.txt

0 comments on commit c9daf7f

Please sign in to comment.