-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.22 KB
/
ci.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
name: Continuous integration
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
continuous_integration:
runs-on: ubuntu-latest
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v2
with:
node-version: 18.x
- name: Install dependencies
run: yarn install
- name: Typecheck openapi-kit
run: yarn workspace openapi-kit typecheck
- name: Build openapi-kit
run: yarn workspace openapi-kit build
- name: Run openapi-kit in example
run: yarn workspace example openapi:pet-store
- name: Ensure example works as expected
run: yarn workspace example typecheck && yarn workspace example build