diff --git a/.github/workflows/alteration-compatibility-integration-test.yml b/.github/workflows/alteration-compatibility-integration-test.yml index 2ec977a4665..a2964710046 100644 --- a/.github/workflows/alteration-compatibility-integration-test.yml +++ b/.github/workflows/alteration-compatibility-integration-test.yml @@ -28,7 +28,7 @@ jobs: id: changes-detection run: | if [[ "${{ github.event_name }}" == "pull_request" ]]; then - BASE=$(git merge-base origin/${{github.base_ref}} HEAD) + BASE=$(git merge-base origin/${{ github.base_ref }} HEAD) else BASE=${{ github.event.before }} fi @@ -47,7 +47,7 @@ jobs: package: needs: check-alteration-changes runs-on: ubuntu-latest - if: ${{needs.check-alteration-changes.outputs.has-alteration-changes == 'true'}} + if: ${{ needs.check-alteration-changes.outputs.has-alteration-changes == 'true' }} env: INTEGRATION_TEST: true DEV_FEATURES_ENABLED: false @@ -55,7 +55,7 @@ jobs: - uses: logto-io/actions-package-logto-artifact@v2 with: artifact-name: alteration-integration-test-${{ github.sha }} - branch: ${{github.base_ref}} + branch: ${{ github.base_ref }} pnpm-version: 9 run-logto: @@ -73,8 +73,8 @@ jobs: steps: - uses: logto-io/actions-run-logto-integration-tests@v3 with: - branch: ${{github.base_ref}} + branch: ${{ github.base_ref }} logto-artifact: alteration-integration-test-${{ github.sha }} test-target: ${{ matrix.target }} - db-alteration-target: ${{github.head_ref}} + db-alteration-target: ${{ github.head_ref }} pnpm-version: 9 diff --git a/.github/workflows/dev-feature-disabled-integration-test.yml b/.github/workflows/dev-feature-disabled-integration-test.yml deleted file mode 100644 index 4413a0acbc9..00000000000 --- a/.github/workflows/dev-feature-disabled-integration-test.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Dev feature disabled compatibility integration test -on: - push: - branches: - - master - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - package: - runs-on: ubuntu-latest - env: - INTEGRATION_TEST: true - DEV_FEATURES_ENABLED: false - steps: - - uses: logto-io/actions-package-logto-artifact@v2 - with: - artifact-name: dev-feature-disabled-integration-test-${{ github.sha }} - pnpm-version: 9 - - run-logto: - strategy: - fail-fast: false - matrix: - target: [api, experience, console] - needs: package - runs-on: ubuntu-latest - env: - INTEGRATION_TEST: true - DEV_FEATURES_ENABLED: false - DB_URL: postgres://postgres:postgres@localhost:5432/postgres - steps: - - uses: logto-io/actions-run-logto-integration-tests@v3 - with: - logto-artifact: dev-feature-disabled-integration-test-${{ github.sha }} - test-target: ${{ matrix.target }} - pnpm-version: 9 diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index ec47c5a7e9d..187340957d6 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -4,7 +4,6 @@ on: push: branches: - master - - "push-action/**" pull_request: concurrency: @@ -13,15 +12,19 @@ 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: @@ -29,16 +32,18 @@ jobs: 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