-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement: split liniting and testing workflows (#256)
* split linting from testing * split linting from testing * move conftest file to testfolder
- Loading branch information
Showing
3 changed files
with
54 additions
and
30 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
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,46 @@ | ||
name: "Test code" | ||
|
||
env: | ||
COLUMNS: 120 | ||
|
||
on: | ||
push: | ||
branches: ["master", "main"] | ||
pull_request: | ||
|
||
jobs: | ||
pytest: | ||
name: "Pytest" | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
runs-on: "ubuntu-latest" | ||
env: | ||
OS: "ubuntu-latest" | ||
PYTHON: "${{ matrix.python-version }}" | ||
steps: | ||
- name: "⤵️ Check out code from GitHub" | ||
uses: "actions/checkout@v4" | ||
- name: "🐍 Set up Python ${{ matrix.python-version }}" | ||
uses: "actions/setup-python@v5" | ||
with: | ||
python-version: "${{ matrix.python-version }}" | ||
- name: "⚙️ Install Poetry" | ||
uses: "abatilo/actions-poetry@v2.3.0" | ||
with: | ||
poetry-version: 1.5.1 | ||
- name: "⚙️ Install dependencies" | ||
run: "poetry install" | ||
- name: "🚀 Run pytest with coverage" | ||
run: | | ||
poetry run pip install coverage | ||
poetry run coverage run --source=mytoyota/ -m pytest | ||
poetry run coverage xml | ||
- name: "⬆️ Upload Coverage to Codecov" | ||
uses: "codecov/codecov-action@v3" | ||
with: | ||
token: "${{ secrets.CODECOV_TOKEN }}" | ||
env_vars: OS,PYTHON | ||
fail_ci_if_error: true | ||
flags: "unittests" | ||
verbose: true |
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