-
Notifications
You must be signed in to change notification settings - Fork 118
65 lines (60 loc) · 1.71 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: "lint"
on:
pull_request:
push:
branches:
- master
jobs:
shellcheck:
# This workflow gets injected into other Linux repositories, but we don't
# want it to run there.
if: ${{ github.repository == 'kernel-patches/vmtest' }}
name: ShellCheck
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
env:
SHELLCHECK_OPTS: --severity=warning --exclude=SC1091
# Ensure some consistency in the formatting.
lint:
if: ${{ github.repository == 'kernel-patches/vmtest' }}
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run black
uses: psf/black@stable
with:
src: ./.github/scripts
validate_matrix:
if: ${{ github.repository == 'kernel-patches/vmtest' }}
name: Validate matrix.py
runs-on: ubuntu-latest
env:
GITHUB_REPOSITORY_OWNER: ${{ matrix.owner }}
GITHUB_REPOSITORY: ${{ matrix.repository }}
GITHUB_OUTPUT: /dev/stdout
strategy:
matrix:
owner: ['kernel-patches', 'foo']
repository: ['bpf', 'vmtest', 'bar']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: run script
run: |
python3 .github/scripts/matrix.py
unittests:
if: ${{ github.repository == 'kernel-patches/vmtest' }}
name: Unittests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run unittests
run: python3 -m unittest scripts/tests/*.py
working-directory: .github