-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from alexwlchan/upgrade-github-actions
Upgrade my GitHub Actions setup
- Loading branch information
Showing
8 changed files
with
75 additions
and
56 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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip-compile" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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 |
---|---|---|
@@ -1,29 +1,44 @@ | ||
on: push | ||
name: Run tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
python-version: 3.12 | ||
cache: pip | ||
cache-dependency-path: dev_requirements.txt | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip3 install --user -r requirements_test.txt | ||
run: python3 -m pip install -r dev_requirements.txt | ||
|
||
- name: Check formatting | ||
run: | | ||
black . | ||
git diff --exit-code | ||
black --check . | ||
# E501 = line too long; anything up to 100-ish is fine in my book | ||
# (the "ish" is intentional; see https://www.youtube.com/watch?v=wf-BqAjZb8M) | ||
# | ||
# E203/W503/W504 = this is where black and flake8 conflict, | ||
# see https://black.readthedocs.io/en/stable/faq.html#why-are-flake8-s-e203-and-w503-violated | ||
flake8 --ignore=E501,E203,W503 --extend-select=W504 | ||
- name: Run test suite | ||
run: | | ||
coverage run -m pytest test_concurrently.py | ||
coverage report | ||
coverage report --skip-covered --fail-under=100 |
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,3 @@ | ||
black | ||
flake8 | ||
pytest-cov |
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,38 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.11 | ||
# by the following command: | ||
# | ||
# pip-compile dev_requirements.in | ||
# | ||
black==24.4.2 | ||
# via -r dev_requirements.in | ||
click==8.1.7 | ||
# via black | ||
coverage[toml]==7.5.1 | ||
# via pytest-cov | ||
flake8==7.0.0 | ||
# via -r dev_requirements.in | ||
iniconfig==2.0.0 | ||
# via pytest | ||
mccabe==0.7.0 | ||
# via flake8 | ||
mypy-extensions==1.0.0 | ||
# via black | ||
packaging==24.0 | ||
# via | ||
# black | ||
# pytest | ||
pathspec==0.12.1 | ||
# via black | ||
platformdirs==4.2.1 | ||
# via black | ||
pluggy==1.5.0 | ||
# via pytest | ||
pycodestyle==2.11.1 | ||
# via flake8 | ||
pyflakes==3.2.0 | ||
# via flake8 | ||
pytest==8.2.0 | ||
# via pytest-cov | ||
pytest-cov==5.0.0 | ||
# via -r dev_requirements.in |
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
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
black | ||
flake8 | ||
pytest-cov |
This file was deleted.
Oops, something went wrong.