Skip to content

Commit

Permalink
Attempt to run e2e tests in azure pipelines instead
Browse files Browse the repository at this point in the history
  • Loading branch information
tonidero committed Jan 18, 2024
1 parent 36dafc3 commit 6d03768
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,12 @@ jobs:
VITE_RC_API_KEY: ${{ secrets.RC_API_KEY }}
VITE_RC_STRIPE_ACCOUNT_ID: ${{ secrets.RC_STRIPE_ACCOUNT_ID }}
VITE_RC_STRIPE_PK_KEY: ${{ secrets.RC_STRIPE_PK_KEY }}

- name: npm e2e tests
working-directory: ./examples/rcbilling-demo
run: |
npm run test:ci
env:
CI: true
VITE_RC_API_KEY: ${{ secrets.RC_API_KEY }}
VITE_RC_STRIPE_ACCOUNT_ID: ${{ secrets.RC_STRIPE_ACCOUNT_ID }}
VITE_RC_STRIPE_PK_KEY: ${{ secrets.RC_STRIPE_PK_KEY }}
# - name: npm e2e tests
# working-directory: ./examples/rcbilling-demo
# run: |
# npm run test:ci
# env:
# CI: true
# VITE_RC_API_KEY: ${{ secrets.RC_API_KEY }}
# VITE_RC_STRIPE_ACCOUNT_ID: ${{ secrets.RC_STRIPE_ACCOUNT_ID }}
# VITE_RC_STRIPE_PK_KEY: ${{ secrets.RC_STRIPE_PK_KEY }}
45 changes: 45 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,48 @@ jobs:
displayName: "Publish to npm"
env:
NODE_AUTH_TOKEN: $(NpmAuthToken)
- job: RunRCBillingDemoTests
displayName: "Run RC Billing demo tests"
steps:
- task: NodeTool@0
inputs:
versionSpec: "18.x"
displayName: "Install Node.js"

- task: Cache@2
inputs:
key: 'npm | "$(Agent.OS)" | package-lock.json'
restoreKeys: 'npm | "$(Agent.OS)"'
path: $(npm_config_cache)
displayName: "Cache npm"

- script: npm ci
displayName: "Install dependencies"

- script: npm run build
displayName: "Build SDK"

- script: npm ci
workingDirectory: "examples/rcbilling-demo"
displayName: "Install dependencies rcbilling-demo"

- script: npm run lint
workingDirectory: "examples/rcbilling-demo"
displayName: Linting rcbilling-demo

- script: npm run prettier:ci
workingDirectory: "examples/rcbilling-demo"
displayName: Prettier rcbilling-demo

- script: npm run build
workingDirectory: "examples/rcbilling-demo"
displayName: "Build rcbilling-demo"

- script: npm run test:ci
workingDirectory: "examples/rcbilling-demo"
displayName: E2E tests rcbilling-demo
env:
VITE_RC_STRIPE_PK_KEY: $(VITE_RC_STRIPE_PK_KEY)
VITE_RC_STRIPE_ACCOUNT_ID: $(VITE_RC_STRIPE_ACCOUNT_ID)
VITE_RC_API_KEY: $(VITE_RC_API_KEY)

0 comments on commit 6d03768

Please sign in to comment.