-
-
Notifications
You must be signed in to change notification settings - Fork 40
69 lines (58 loc) · 1.55 KB
/
Copy pathbuild-lint-test.yml
File metadata and controls
69 lines (58 loc) · 1.55 KB
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
name: Build, Lint, and Test
on:
workflow_call:
inputs:
NPM_REGISTRY_NAME:
type: string
default: '@metamask'
NPM_REGISTRY_URL:
type: string
required: false
default: 'https://registry.npmjs.org'
NPM_CLIENT:
type: string
default: 'yarn'
jobs:
pipeline:
name: Turbo Pipeline
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
with:
is-high-risk-environment: false
cache-node-modules: true
submodules: 'recursive'
- name: Install Foundry
uses: MetaMask/foundry-toolchain@v1
with:
version: nightly
- name: Run Forge Install
run: forge install
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install Yarn dependencies
run: yarn install
- name: Run build
run: yarn build
env:
NODE_ENV: production
- name: Run lint
run: yarn lint
- name: Run all tests
run: yarn test
- name: Validate changelogs
run: yarn changelog:validate
- name: Require clean working directory
shell: bash
run: |
if ! git diff --exit-code; then
echo "Working tree dirty at end of job"
exit 1
fi