Skip to content

Commit c9fadbb

Browse files
authored
fix: support patterns for windows (#6)
1 parent 17ed2c1 commit c9fadbb

File tree

7 files changed

+302
-3350
lines changed

7 files changed

+302
-3350
lines changed

.github/workflows/test.yml

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,22 @@ on:
1010

1111
jobs:
1212
test:
13-
runs-on: ubuntu-latest
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest, macos-latest, windows-latest]
1417

1518
steps:
1619
- name: Checkout
1720
uses: actions/checkout@v3
18-
21+
- uses: pnpm/action-setup@v2
22+
with:
23+
version: 7
1924
- name: Install Node.js
2025
uses: actions/setup-node@v3
2126
with:
2227
node-version: 16
23-
24-
- uses: pnpm/action-setup@v2.0.1
25-
name: Install pnpm
26-
id: pnpm-install
27-
with:
28-
version: 7
29-
run_install: false
30-
31-
- name: Get pnpm store directory
32-
id: pnpm-cache
33-
run: |
34-
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
35-
36-
- uses: actions/cache@v3
37-
name: Setup pnpm cache
38-
with:
39-
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
40-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
41-
restore-keys: |
42-
${{ runner.os }}-pnpm-store-
28+
cache: 'pnpm'
4329

4430
- name: Install dependencies
4531
run: pnpm -w install
@@ -51,4 +37,9 @@ jobs:
5137
run: pnpm --filter @7nohe/react-app install
5238

5339
- name: Run test
54-
run: pnpm --filter @7nohe/react-app test:generated
40+
run: pnpm --filter @7nohe/react-app test:generated
41+
- name: Archive generated query file
42+
uses: actions/upload-artifact@v3
43+
with:
44+
name: generated-query-file-${{ matrix.os }}
45+
path: examples/react-app/openapi/queries/index.ts

examples/react-app/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
"test:generated": "npm run generate:api && tsc ./openapi/queries/index.ts --noEmit --target esnext --moduleResolution node"
1414
},
1515
"dependencies": {
16-
"@tanstack/react-query": "^4.0.10",
16+
"@tanstack/react-query": "^4.20.4",
17+
"axios": "^1.2.1",
18+
"form-data": "4.x",
1719
"react": "^18.2.0",
18-
"react-dom": "^18.2.0",
19-
"axios": "^0.27.2",
20-
"form-data": "4.x"
20+
"react-dom": "^18.2.0"
2121
},
2222
"devDependencies": {
2323
"@stoplight/prism-cli": "^4.10.1",
24-
"@types/react": "^18.0.15",
25-
"@types/react-dom": "^18.0.6",
26-
"@vitejs/plugin-react": "^2.0.0",
24+
"@types/react": "^18.0.26",
25+
"@types/react-dom": "^18.0.9",
26+
"@vitejs/plugin-react": "^3.0.0",
2727
"npm-run-all": "^4.1.5",
2828
"typescript": "^4.6.4",
2929
"vite": "^3.0.0"

0 commit comments

Comments
 (0)