-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Use tox environments in matrix
- Loading branch information
1 parent
d0475bf
commit 3132214
Showing
2 changed files
with
13 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,10 +16,11 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
include: | ||
- { python-version: "3.7", os: "ubuntu-latest" } | ||
- { python-version: "3.8", os: "ubuntu-latest" } | ||
- { python-version: "3.9", os: "ubuntu-latest" } | ||
- { python-version: "3.10", os: "ubuntu-latest" } | ||
- { tox-env: no_external, python-version: "3.7", os: "ubuntu-latest" } | ||
- { tox-env: no_external, python-version: "3.8", os: "ubuntu-latest" } | ||
- { tox-env: no_external, python-version: "3.9", os: "ubuntu-latest" } | ||
- { tox-env: no_external, python-version: "3.10", os: "ubuntu-latest" } | ||
- { tox-env: lint, python-version: "3.8", os: "ubuntu-latest" } | ||
|
||
steps: | ||
- name: Check out the repository | ||
|
@@ -51,54 +52,6 @@ jobs: | |
poetry env use "${{ matrix.python-version }}" | ||
poetry install | ||
# TODO: Run complete test suite. Requires setting up some repository secrets | ||
- name: Run tests | ||
- name: Run tox | ||
run: | | ||
poetry run pytest --doctest-modules singer_sdk | ||
poetry run pytest tests/core | ||
poetry run pytest tests/cookiecutters | ||
# TODO: Avoid this repetition by leveraging Tox sessions | ||
lint: | ||
name: Lint on ${{ matrix.python-version }} / ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
continue-on-error: false | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- { python-version: "3.8", os: "ubuntu-latest" } | ||
steps: | ||
- name: Check out the repository | ||
uses: actions/[email protected] | ||
|
||
- name: Install Poetry | ||
env: | ||
PIP_CONSTRAINT: .github/workflows/constraints.txt | ||
run: | | ||
pipx install poetry | ||
poetry --version | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
cache: 'poetry' | ||
|
||
- name: Upgrade pip | ||
env: | ||
PIP_CONSTRAINT: .github/workflows/constraints.txt | ||
run: | | ||
pip install pip | ||
pip --version | ||
- name: Install Dependencies | ||
run: | | ||
poetry env use "${{ matrix.python-version }}" | ||
poetry install | ||
- name: Run tests | ||
run: | | ||
poetry run tox -e lint | ||
poetry run tox -e ${{ matrix.tox-env }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters