-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (43 loc) · 1.21 KB
/
build-and-test.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
name: Lint
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches: [main]
permissions:
contents: read
jobs:
build-and-test:
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && !github.event.pull_request.draft && !startsWith(github.event.pull_request.title, 'WIP ')) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
clean: true
lfs: true
submodules: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: "pip"
- run: pip install -r requirements.txt
- run: black --check .
- run: pylint salt2type
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: "16"
- run: npm install
working-directory: tpl
- run: npx prettier --check ..
working-directory: tpl
- run: npm run lint
working-directory: tpl
- run: npm run typecheck
working-directory: tpl
- run: npm run build
working-directory: tpl
- run: npm run test
working-directory: tpl