-
Notifications
You must be signed in to change notification settings - Fork 568
66 lines (56 loc) · 1.64 KB
/
faucet_test.yml
File metadata and controls
66 lines (56 loc) · 1.64 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
name: Faucet Tests
on:
push:
branches: [main]
workflow_dispatch:
workflow_call:
inputs:
git_ref:
description: 'Git ref to checkout (branch, tag, or commit SHA)'
required: true
type: string
run_faucet_tests:
description: 'Run faucet tests job'
required: false
type: boolean
default: true
jobs:
faucet-test:
if: ${{ github.event_name != 'workflow_dispatch' || inputs.run_faucet_tests != false }}
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
max-parallel: 1
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.git_ref || github.ref }}
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Setup npm version 10
run: |
npm i -g npm@10 --registry=https://registry.npmjs.org
- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-deps-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-deps-${{ matrix.node-version }}-
- name: Install Dependencies
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: npm ci
- name: Build
run: npm run build
- name: Run Faucet Tests
run: npm run test:faucet