forked from WordPress/gutenberg
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (40 loc) · 1.65 KB
/
static-checks.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
name: Static Analysis (Linting, License, Type checks...)
on:
pull_request:
push:
branches:
- trunk
- 'release/**'
- 'wp/**'
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
check:
name: All
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
- name: Use desired version of NodeJS
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2
with:
node-version: 14
cache: npm
- name: Npm install
# A "full" install is executed, since `npm ci` does not always exit
# with an error status code if the lock file is inaccurate.
#
# See: https://github.com/WordPress/gutenberg/issues/16157
run: npm install
- name: Lint JavaScript and Styles
run: npm run lint
- name: Type checking
run: npm run build:package-types
- name: Check local changes
run: npm run check-local-changes
- name: License compatibility
run: npm run check-licenses