Skip to content

Commit cd0e581

Browse files
committed
Add linter workflow
1 parent a8db378 commit cd0e581

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

.github/workflows/lint-code.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Run and Apply Linter
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
branches: [ master ]
6+
jobs:
7+
run-and-apply:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
max-parallel: 1
11+
steps:
12+
- name: Checkout main branch
13+
uses: actions/checkout@v2
14+
with:
15+
ref: ${{ github.event.pull_request.head.ref }}
16+
- name: Install dependencies
17+
run: |
18+
pip install --upgrade pip setuptools wheel
19+
pip install "tox<4.0.0"
20+
- name: Permission workaround
21+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
22+
- name: Run linter
23+
run: tox -e lint
24+
- name: Commit changes
25+
uses: EndBug/add-and-commit@v9
26+
with:
27+
message: 'Commit automated linter changes'
28+
add: '.'

.github/workflows/obo-test.yml

-8
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@ jobs:
2020
- name: Install requirements
2121
run: |
2222
python3 -m pip install -r requirements.txt
23-
- name: Run linter
24-
run: |
25-
tox -e lint
26-
- name: Commit linter changes
27-
uses: EndBug/add-and-commit@v9
28-
with:
29-
message: 'Apply linter changes'
30-
add: '.'
3123
- name: Run tests
3224
run: |
3325
make test

0 commit comments

Comments
 (0)