-
Notifications
You must be signed in to change notification settings - Fork 83
59 lines (57 loc) · 1.67 KB
/
test-npm.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
59
name: NPM Tests
on:
push:
branches-ignore:
- "master"
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
npm:
runs-on: ubuntu-latest
env:
CYPRESS_INSTALL_BINARY: 0
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Get npm cache directory path
id: npm-cache-dir-path
run: echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: npm-cache
with:
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install Dependencies
env:
CYPRESS_INSTALL_BINARY: 0
run: npm ci
- name: Install Cypress Dependencies
working-directory: ./e2e-tests
run: npm ci
- name: Build source
run: npm run build
- name: Run package check
run: npm run lint:package-json
- name: Run dashboard check
run: npm run lint:dash
- name: Run customizer check
run: npm run lint:customizer
- name: Run Stylelint on SCSS
run: npm run lint:scss
- name: Run global JS check
run: npm run lint:global
- name: Run size check
# WORKAROUND FOR SIZE-LIMIT JOB NUMBER
env:
CI_JOB_NUMBER: 1
run: npm run size