-
-
Notifications
You must be signed in to change notification settings - Fork 8
47 lines (39 loc) · 956 Bytes
/
pr-check.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
name: PR Check
permissions:
contents: read
pull-requests: write
on:
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/[email protected]
- name: Install dependencies and build
run: |
cd ./apps/cli
pnpm i
pnpm build
- name: Run built CLI app
run: |
cd ./apps/cli/dist
node index.js -s https://petstore.swagger.io/v2/swagger.json -t ./api
- name: Check if Api.ts was created
run: |
if [ -f ./apps/cli/dist/api/Api.ts ];
then echo "Api.ts exists";
else echo "Api.ts does not exist" && exit 1;
fi
- name: Run tests
run: |
cd ./apps/cli
pnpm test
- name: Build docs
run: |
cd ./apps/docs
pnpm build