forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (56 loc) · 1.93 KB
/
Copy pathprechecks.yml
File metadata and controls
61 lines (56 loc) · 1.93 KB
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
51
52
53
54
55
56
57
58
59
60
61
name: prechecks
on:
workflow_call:
inputs:
with_coverage:
required: true
type: string
with_packages:
required: true
type: string
concurrency:
group: style-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
cancel-in-progress: true
jobs:
# Validate that the code can be run on all the Python versions supported by Spack
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: '3.13'
- name: Install Python Packages
run: |
pip install -r .github/workflows/requirements/style/requirements.txt
- name: vermin
run: |
vermin --backport importlib \
--backport argparse \
--violations \
--backport typing \
-t=3.6- \
-vvv \
--exclude-regex lib/spack/spack/vendor \
lib/spack/spack/ lib/spack/llnl/ bin/ var/spack/test_repos
# Run style checks on the files that have been changed
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 2
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: '3.13'
- name: Install Python packages
run: |
pip install -r .github/workflows/requirements/style/requirements.txt
echo "PYTHONPATH=$PWD/lib/spack" >> $GITHUB_ENV
- name: Run style tests (code)
run: |
bin/spack style --base HEAD^1
bin/spack license verify
pylint -j $(nproc) --disable=all --enable=unspecified-encoding --ignore-paths=lib/spack/spack/vendor lib
- name: Run style tests (docs)
run: .github/workflows/bin/format-rst.py $(git ls-files 'lib/spack/docs/*.rst')