-
Notifications
You must be signed in to change notification settings - Fork 17
61 lines (51 loc) · 1.4 KB
/
test-cli.yaml
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
name: Test_CLI
on:
pull_request:
paths:
- "cli/src/**"
- "cli/test/**"
- "package*.json"
- "cli/tsconfig*.json"
- "cli/jest.config.js"
push:
branches:
- main
paths:
- "cli/src/**"
- "cli/test/**"
- "package*.json"
- "cli/tsconfig*.json"
- "cli/jest.config.js"
# env:
# NODE_VERSION: "20.17.0" # Fixed version for better stability
permissions:
contents: read
jobs:
main:
runs-on: token-studio-linux-medium
container:
image: node:20.17.0-alpine3.20 # Using alpine for a smaller image
permissions:
contents: read
steps:
# * Initial steps
- name: Harden Runner
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 #v2.8.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Initial steps
uses: ./.github/actions/initial-steps
with:
deps-contracts-install: "true"
# * Prepare other modules
- name: Install and build Contracts, SDK and CLI
uses: ./.github/actions/install-and-build
with:
module: "cli"
# * Specific steps for the CLI
- name: Run tests CLI
run: npm run test:ci --workspace=cli
- name: Clear Cache
run: npm run clear-cache --workspace=cli