Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 14 additions & 23 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,22 @@ on:

jobs:
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- name: Checkout
uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
version: 7
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
cache: 'pnpm'

- name: Install dependencies
run: pnpm -w install
Expand All @@ -51,4 +37,9 @@ jobs:
run: pnpm --filter @7nohe/react-app install

- name: Run test
run: pnpm --filter @7nohe/react-app test:generated
run: pnpm --filter @7nohe/react-app test:generated
- name: Archive generated query file
uses: actions/upload-artifact@v3
with:
name: generated-query-file-${{ matrix.os }}
path: examples/react-app/openapi/queries/index.ts
14 changes: 7 additions & 7 deletions examples/react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
"test:generated": "npm run generate:api && tsc ./openapi/queries/index.ts --noEmit --target esnext --moduleResolution node"
},
"dependencies": {
"@tanstack/react-query": "^4.0.10",
"@tanstack/react-query": "^4.20.4",
"axios": "^1.2.1",
"form-data": "4.x",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"axios": "^0.27.2",
"form-data": "4.x"
"react-dom": "^18.2.0"
},
"devDependencies": {
"@stoplight/prism-cli": "^4.10.1",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"@vitejs/plugin-react": "^2.0.0",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"@vitejs/plugin-react": "^3.0.0",
"npm-run-all": "^4.1.5",
"typescript": "^4.6.4",
"vite": "^3.0.0"
Expand Down
Loading