Skip to content

Commit

Permalink
ci: refactor integration tests workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gao-sun committed Jun 29, 2024
1 parent e548eea commit 9dfcecb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 45 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/dev-feature-disabled-integration-test.yml

This file was deleted.

15 changes: 10 additions & 5 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
- "push-action/**"
pull_request:

concurrency:
Expand All @@ -13,32 +12,38 @@ concurrency:

jobs:
package:
strategy:
matrix:
# Run the integration tests with and without dev features enabled
dev-features-enabled: [true, false]
runs-on: ubuntu-latest
env:
INTEGRATION_TEST: true
DEV_FEATURES_ENABLED: true
DEV_FEATURES_ENABLED: ${{ matrix.dev-features-enabled }}

steps:
- uses: logto-io/actions-package-logto-artifact@v2
with:
artifact-name: integration-test-${{ github.sha }}
artifact-name: integration-test-${{ github.sha }}-dev-features-${{ matrix.dev-features-enabled }}
pnpm-version: 9

run-logto:
strategy:
fail-fast: false
matrix:
target: [api, experience, console]
# Run the integration tests with and without dev features enabled
dev-features-enabled: [true, false]
needs: package
runs-on: ubuntu-latest
env:
INTEGRATION_TEST: true
DEV_FEATURES_ENABLED: true
DEV_FEATURES_ENABLED: ${{ matrix.dev-features-enabled }}
DB_URL: postgres://postgres:postgres@localhost:5432/postgres

steps:
- uses: logto-io/actions-run-logto-integration-tests@v3
with:
logto-artifact: integration-test-${{ github.sha }}
logto-artifact: integration-test-${{ github.sha }}-dev-features-${{ env.DEV_FEATURES_ENABLED }}
test-target: ${{ matrix.target }}
pnpm-version: 9

0 comments on commit 9dfcecb

Please sign in to comment.