forked from ledgerleapllc/CasperAssociationPortal
-
Notifications
You must be signed in to change notification settings - Fork 6
56 lines (48 loc) · 1.71 KB
/
check.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
---
#TODO: Find a way to test "yarn dev" and "yarn preview" in the CI
name: Check code
env:
APP_HOME: app
NODE_VERSION: 17.9.0
# yamllint disable-line rule:truthy
on:
push:
branches: "*"
pull_request:
types: [opened, reopened, synchronize]
jobs:
lint-format-and-dep-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Lint Code Base (PR against development branch)
# yamllint disable-line rule:line-length
if: github.event_name == 'pull_request' && github.base_ref == 'development'
uses: github/super-linter/slim@v4
env:
VALIDATE_ALL_CODEBASE: true
DEFAULT_BRANCH: ${{ github.base_ref }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Lint Code Base (against PR base branch)
# yamllint disable-line rule:line-length
if: github.event_name == 'pull_request' && github.base_ref != 'development'
uses: github/super-linter/slim@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: ${{ github.base_ref }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISABLE_ERRORS: true
- name: Lint Code Base (against current branch)
if: github.event_name == 'push'
uses: github/super-linter/slim@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: ${{ github.head_ref }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISABLE_ERRORS: true
# TODO: Check allow-licenses to test for deps with non-permissive licenses
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
with:
fail-on-severity: 'high'
base-ref: ${{ github.base_ref }}