forked from dbt-labs/hubcap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tox for pytest within GitHub Actions (GHA) (dbt-labs#200)
- Loading branch information
Showing
4 changed files
with
62 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -35,3 +35,33 @@ jobs: | |
python -m pip install -r requirements-dev.txt | ||
- name: Run pre-commit hooks | ||
run: pre-commit run --all-files --show-diff-on-failure | ||
|
||
unit: | ||
name: unit test / python ${{ matrix.python-version }} / ${{ matrix.os }} | ||
|
||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 10 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9"] | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install python tools | ||
run: | | ||
python -m pip install --user --upgrade pip | ||
python -m pip --version | ||
python -m pip install tox | ||
tox --version | ||
- name: Run tests | ||
run: tox |
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
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ black==22.6.0 | |
pip-tools | ||
pre-commit | ||
pytest | ||
tox |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[tox] | ||
skipsdist = True | ||
envlist = unit | ||
|
||
[testenv:{unit,py39,py}] | ||
description = unit testing | ||
download = true | ||
skip_install = true | ||
commands = | ||
{envpython} -m pytest | ||
deps = | ||
-rrequirements-dev.txt |