Repository navigation
55 lines (51 loc) · 1.91 KB
/
Copy pathcheck.yml
File metadata and controls
55 lines (51 loc) · 1.91 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
name: check
on:
push:
branches: [master]
pull_request:
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Lint shell scripts
run: git ls-files -z '*.sh' | xargs -0 shellcheck
- name: Check plugin consistency
run: bash scripts/check.sh
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.13"
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: "24"
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
with:
go-version: "1.26"
cache: false
- name: Lint, type-check and test bench scorer
working-directory: bench
run: |
python -m pip install --quiet pytest==9.2.0 PyYAML==6.0.3 ruff==0.17.6 mypy==2.4.1 types-PyYAML==6.0.12.20261113
python -m ruff check .
python -m ruff format --check .
python -m mypy --strict ./*.py
for scorer in tasks/*/scorer.py; do python -m mypy --strict "${scorer}"; done
BENCH_DOCKER_FIXTURES=off python -m pytest -q -p no:cacheprovider --ignore=tasks
- name: Check references (version lines, links, code blocks)
run: |
python -m ruff check --config bench/ruff.toml scripts
python -m ruff format --check --config bench/ruff.toml scripts
python -m mypy --strict scripts/*.py
python -m pytest -q -p no:cacheprovider scripts
python scripts/check_references.py
- name: Test shell scripts
run: npx --yes bats@1.13.0 tests/