-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (46 loc) · 1.44 KB
/
verify.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: Verify
on:
pull_request:
jobs:
py-scripts-lint:
name: Check for formatting of python scripts
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Setting up python libraries
run: ./scripts/setup-python.sh
# Reference: https://black.readthedocs.io/en/stable/integrations/github_actions.html
- uses: psf/black@stable
with:
options: "--check --verbose"
formatting-lint:
name: Check for formatting & lint errors
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
- name: Setup Node
uses: actions/[email protected]
with:
node-version-file: .nvmrc
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Run Lint Checks
run: |
npm run lint
- run: git diff --exit-code
- name: Error message
if: ${{ failure() }}
run: |
echo 'Eslint check is failing Ensure you have run `npm run lint` and committed the files locally.'