forked from sagemath/sage
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.19 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Lint
on:
push:
branches:
- master
- develop
pull_request:
merge_group:
concurrency:
# Cancel previous runs of this workflow for the same branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Merge CI fixes from sagemath/sage
run: |
.ci/merge-fixes.sh
env:
GH_TOKEN: ${{ github.token }}
SAGE_CI_FIXES_FROM_REPOSITORIES: ${{ vars.SAGE_CI_FIXES_FROM_REPOSITORIES }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
id: deps
run: pip install tox
- name: Code style check with pycodestyle
if: (success() || failure()) && steps.deps.outcome == 'success'
run: tox -e pycodestyle-minimal
- name: Code style check with relint
if: (success() || failure()) && steps.deps.outcome == 'success'
run: tox -e relint -- src/sage/
- name: Validate docstring markup as RST
if: (success() || failure()) && steps.deps.outcome == 'success'
run: tox -e rst