-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (72 loc) · 2.02 KB
/
check-pull-request.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Check Pull Request
on:
pull_request:
branches:
- main
types:
- opened
- edited
- reopened
- synchronize
- ready_for_review
workflow_dispatch:
jobs:
install:
name: Install
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner:
- ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v4
id: npm-install-cache
with:
enableCrossOsArchive: true
key: npm-install-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
path: node_modules
- name: Setup Node.js
# if: steps.npm-install-cache.outputs.cache-hit != 'true'
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version-file: .nvmrc
- name: Install dependencies
# if: steps.npm-install-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Locate @defra/forms-model
run: |
npm ls @defra/forms-model
# tasks:
# name: ${{ matrix.task.description }} (${{ matrix.runner }})
# runs-on: ${{ matrix.runner }}
# needs: [install]
# strategy:
# fail-fast: false
# matrix:
# runner:
# - ubuntu-latest
# task:
# - description: Prettier
# run: npm run format:check
# - description: ESLint
# run: npm run lint:js
# - description: TypeScript compiler
# run: npm run lint:types
# - description: Unit tests
# run: npm run test
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Restore dependencies
# uses: actions/cache/restore@v4
# with:
# enableCrossOsArchive: true
# key: npm-install-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
# path: node_modules
# - name: Run lint task
# run: ${{ matrix.task.run }}