forked from thesofproject/sof-test
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.58 KB
/
pull_request.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
---
# Tools that can save round-trips to github and a lot of time:
#
# yamllint -f parsable pull_request.yml
# pip3 install ruamel.yaml.cmd
# yaml json pull_request.yml
# yaml merge-expand pull_request.yml exp.yml &&
# diff -b -u pull_request.yml exp.yml
# TODO: see if https://github.com/trilom/file-changes-action/ or similar
# can replace check-gitrange.bash
name: Pull Requests
# yamllint disable-line rule:truthy
on: [pull_request, workflow_dispatch]
jobs:
shellcheck:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: shellcheck
env:
BASE_REF: ${{ github.base_ref }}
# Triple-dotted 'origin/master...HEAD'
run: ./tools/CI/check-gitrange.bash origin/${BASE_REF}...HEAD
text/x-shellscript shellcheck -x
pylint:
runs-on: ubuntu-22.04
steps:
# :-( https://git.luolix.topmunity/t/support-for-yaml-anchors/16128
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: python --version
# Package index is "out of date by design"
# https://github.com/actions/virtual-environments/issues/1757
- name: apt-get -y update
run: sudo apt-get -y update
- name: get python libs
run: sudo apt-get -y install $(cat python-deps.txt)
- name: pylint
env:
BASE_REF: ${{ github.base_ref }}
# let's re-enable 'C'onventions once we got the other numbers down
run: ./tools/CI/check-gitrange.bash origin/${BASE_REF}...HEAD
text/x-script.python pylint --disable=C