-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve workflows to use github caches (#182)
* add dev dependencies for linting * update all workflows to use caches * remove race condition for flash loader tests and remove additional generated buffer files * remove race condition in test_io, and remove generated test files * remove race condition for sed_config.yaml detetion from test_processor.py * produce a coverge file in xml format and use with coveralls * added PR trigger * changed testing file name to include coverage * removed update_requirements.yml * updated poetry.lock --------- Co-authored-by: rettigl <[email protected]>
- Loading branch information
1 parent
06c1187
commit 9e35e99
Showing
11 changed files
with
341 additions
and
169 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: linting | ||
|
||
# Triggers the workflow on push for all branches | ||
on: [push] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Check out repo and set up Python | ||
- uses: actions/checkout@v3 | ||
with: | ||
lfs: true | ||
|
||
# Use cached python and dependencies, install poetry | ||
- name: "Setup Python, Poetry and Dependencies" | ||
uses: packetcoders/action-setup-cache-python-poetry@main | ||
with: | ||
python-version: 3.8 | ||
poetry-version: 1.2.2 | ||
|
||
# Linting steps, excute all linters even if one fails | ||
- name: pycodestyle | ||
run: | ||
poetry run pycodestyle --ignore=E203,E501,W503 sed tests | ||
- name: pylint | ||
if: ${{ always() }} | ||
run: | ||
poetry run pylint --good-names=i,j,k,ex,x,y,t,k,v,ax,df,ec,mc,dc,ct --disable=fixme,too-many-branches,too-many-locals,too-many-statements,too-many-arguments,too-many-lines,too-many-public-methods,too-many-instance-attributes,too-few-public-methods sed tests | ||
- name: mypy | ||
if: ${{ always() }} | ||
run: | ||
poetry run mypy --ignore-missing-imports --follow-imports=silent --no-strict-optional sed tests |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,33 @@ | ||
name: pytest and coverage report | ||
|
||
# Triggers the workflow on push and PR for all branches | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
pytest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Check out repo and set up Python | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
|
||
# Use cached python and dependencies, install poetry | ||
- name: "Setup Python, Poetry and Dependencies" | ||
uses: packetcoders/action-setup-cache-python-poetry@main | ||
with: | ||
python-version: 3.8 | ||
poetry-version: 1.2.2 | ||
|
||
# Run pytest with coverage report, saving to xml | ||
- name: Run tests on python 3.8 | ||
run: | | ||
poetry run pytest --cov --cov-report xml:cobertura.xml --full-trace --show-capture=no -sv -n auto tests/ | ||
# Take report and upload to coveralls | ||
- name: Coveralls | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ./cobertura.xml |
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,30 @@ | ||
name: pytest multiversion | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
pytest: | ||
# Using matrix strategy | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10"] | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Check out repo and set up Python | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
|
||
- name: "Setup Python, Poetry and Dependencies" | ||
uses: packetcoders/action-setup-cache-python-poetry@main | ||
with: | ||
python-version: ${{matrix.python-version}} | ||
poetry-version: 1.2.2 | ||
|
||
# Use cached python and dependencies, install poetry | ||
- name: Run tests on python ${{matrix.python-version}} | ||
run: | | ||
poetry run pytest--full-trace --show-capture=no -sv -n auto tests/ |
Oops, something went wrong.