-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (57 loc) · 1.49 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
name: Test CLI
on:
pull_request:
branches:
- main
paths:
- 'cli/**'
- '.stoat/**'
- '.github/workflows/test-cli.yaml'
push:
branches:
- main
paths:
- 'cli/**'
- '.stoat/**'
- '.github/workflows/test-cli.yaml'
defaults:
run:
working-directory: cli
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup cache
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/types/node_modules
${{ github.workspace }}/action/node_modules
${{ github.workspace }}/cli/node_modules
key: ${{ runner.os }}-node-20-cli-${{ hashFiles('types/yarn.lock') }}-${{ hashFiles('action/yarn.lock') }}-${{ hashFiles('cli/yarn.lock') }}
- name: Install types dependencies
working-directory: types
run: |
yarn install --frozen-lockfile
- name: Install action dependencies
working-directory: action
run: |
yarn install --frozen-lockfile
- name: Install cli dependencies
run: |
yarn install --frozen-lockfile
- name: Build and test stoat cli
run: |
yarn build
yarn test
- name: Check format
run: yarn format-check
- name: Run stoat action
uses: ./
if: always()