Skip to content

Commit

Permalink
ci/cd: upload CI to run unit tests and upload test
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzeng committed Oct 3, 2024
1 parent 35e9237 commit 01abea6
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
workflow_dispatch:

jobs:
test:
name: Run tests
unit-test:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -18,16 +18,33 @@ jobs:
node-version: '20'
- uses: pnpm/action-setup@v3
with:
version: ^9.11.0
version: ^9.12.0
run_install: true
- run: pnpm test:unit-test
upload-test:
name: Run upload test
needs: unit-test
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- uses: pnpm/action-setup@v3
with:
version: ^9.12.0
run_install: true
- env:
TEST_API_KEY: ${{ secrets.TEST_API_KEY }}
TEST_CLIENT_ID: ${{ secrets.TEST_CLIENT_ID }}
TEST_PRODUCT_ID: ${{ secrets.TEST_PRODUCT_ID }}
run: pnpm test
run: pnpm test:upload
publish:
name: Publish action
needs: test
needs:
- unit-test
- upload-test
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 01abea6

Please sign in to comment.