Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tox -e lint to GHA #2412

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Autoformat code and metadata
on:
workflow_dispatch:
pull_request:
branches: [ master ]
jobs:
run-and-apply:
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Install dependencies
run: pip install --upgrade pip setuptools wheel "tox<4.0.0"
- name: Permission workaround
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Run formatter
run: tox -e lint
- name: Commit all changes
run: |
if [[ `git status --porcelain` ]]; then
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Apply code formatting"
git push
fi
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install test requirements
run: |
python3 -m pip install -r requirements.txt
- name: Run tests
run: |
make test
20 changes: 10 additions & 10 deletions _data/operations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,16 @@ members:
name: James Stevenson
orcid: 0000-0002-2568-6163
wikidata: Q125208044
- affiliation:
name: SciBite
ror: 055j8ya05
country: UK
github: janelomax
groups:
- outreach
name: Jane Lomax
orcid: 0000-0001-8865-4321
wikidata: Q20746117
- affiliation:
name: University of Pennsylvania, Philadelphia, PA
ror: 00b30xv10
Expand Down Expand Up @@ -372,13 +382,3 @@ members:
name: Vinícius de Souza
orcid: 0000-0003-3961-0247
wikidata: Q125502774
- affiliation:
name: SciBite
ror: 055j8ya05
country: UK
github: janelomax
groups:
- outreach
name: Jane Lomax
orcid: 0000-0001-8865-4321
wikidata: Q20746117