-
-
Notifications
You must be signed in to change notification settings - Fork 33
62 lines (59 loc) · 1.73 KB
/
validations.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Validations
on:
push:
branches: [ master, v18, v19, v20, v21 ]
pull_request:
branches: [ master, v18, v19, v20, v21 ]
jobs:
OpenAPI:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# - name: Validate against OpenAPI 3.1
# uses: char0n/apidom-validate@v1
# with:
# definition-file: example/example.documentation.yaml
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install
- run: pnpm test:oas
- name: Build tests
run: pnpm postbuild # builds the tests
- name: Build distribution
run: pnpm -F express-zod-api build
- name: Pack artifact
working-directory: express-zod-api # https://github.com/pnpm/pnpm/issues/4351
run: pnpm pack --out ../compat-test/dist.tgz
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: compat-test
Compatibility:
name: express@${{matrix.express-version}}
needs: OpenAPI
runs-on: ubuntu-latest
strategy:
matrix:
express-version: [ 4, 5 ]
steps:
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: dist
- name: Add dependencies
run: |
yarn add express@${{matrix.express-version}} typescript@5.1 http-errors zod
yarn add -D eslint@9.0 typescript-eslint@8.0 vitest tsx
yarn add express-zod-api@./dist.tgz
- name: Run tests
run: |
yarn eslint --fix
yarn vitest