Skip to content

Commit

Permalink
Add E2E CLI test (#1247)
Browse files Browse the repository at this point in the history
  • Loading branch information
eemmiillyy authored Nov 22, 2023
1 parent d981563 commit 7478fbc
Show file tree
Hide file tree
Showing 4 changed files with 425 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@ jobs:
```
npx @xata.io/cli@${{ steps.version.outputs.TAG }}
```
- name: Canary build E2E test
if: ${{ steps.secrets.outputs.exist == 'true' && github.event_name == 'pull_request' }}
run: pnpm run test:canary
env:
XATA_API_KEY: ${{ secrets.INTEGRATION_TEST_API_KEY }}
XATA_WORKSPACE: ${{ secrets.INTEGRATION_TEST_WORKSPACE }}
CANARY_VERSION: ${{ steps.version.outputs.TAG }}

test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -204,7 +211,5 @@ jobs:
run: |
pnpm test
env:
XATA_DATABASE_URL: ${{ secrets.INTEGRATION_TEST_DATABASE_URL }}
XATA_API_KEY: ${{ secrets.INTEGRATION_TEST_API_KEY }}
XATA_BRANCH: ${{ secrets.INTEGRATION_TEST_BRANCH }}
XATA_WORKSPACE: ${{ secrets.INTEGRATION_TEST_WORKSPACE }}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "index.js",
"scripts": {
"test": "vitest",
"test:canary": "tsx ./scripts/test-canary.ts",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"prepare": "husky install",
Expand Down Expand Up @@ -65,6 +66,7 @@
"rollup-plugin-strip-code": "^0.2.7",
"size-limit": "^11.0.0",
"ts-node": "^10.9.1",
"tsx": "^4.0.0",
"turbo": "^1.10.16",
"typescript": "^5.2.2",
"vite": "^5.0.0",
Expand Down
Loading

0 comments on commit 7478fbc

Please sign in to comment.