forked from thesofproject/sof-test
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.55 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
---
# 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-20.04
steps:
- {uses: actions/checkout@v2, 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-20.04
steps:
# :-( https://github.community/t/support-for-yaml-anchors/16128
- {uses: actions/checkout@v2, 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-python pylint --disable=C