Skip to content

Commit

Permalink
enable release-mode tests in self-test
Browse files Browse the repository at this point in the history
  • Loading branch information
MahdiBM committed Nov 17, 2024
1 parent 17b2e65 commit 4324c2c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,16 @@ jobs:
timeout-minutes: 60
steps:
- name: Check out code
if: ${{ matrix.swift-config.build-mode == 'debug' || !inputs.with_release_mode_testing }}
if: ${{ matrix.swift-config.build-mode == 'debug' || inputs.with_release_mode_testing }}
uses: actions/checkout@v4
- name: Check Swift compatibility
id: swift-check
if: ${{ matrix.swift-config.build-mode == 'debug' || !inputs.with_release_mode_testing }}
if: ${{ matrix.swift-config.build-mode == 'debug' || inputs.with_release_mode_testing }}
uses: vapor/ci/.github/actions/check-compatible-swift@main
with:
package_root: ${{ inputs.package_root }}
- name: Run unit tests
if: ${{ steps.swift-check.outputs.swift-compatible == 'true' && (matrix.swift-config.build-mode == 'debug' || !inputs.with_release_mode_testing) }}
if: ${{ steps.swift-check.outputs.swift-compatible == 'true' && (matrix.swift-config.build-mode == 'debug' || inputs.with_release_mode_testing) }}
run: |
SWIFT_DETERMINISTIC_HASHING=1 \
swift test \
Expand All @@ -176,7 +176,7 @@ jobs:
${TEST_FILTER} \
${EXTRA_FLAGS}
- name: Upload coverage data
if: ${{ inputs.with_coverage && (steps.swift-check.outputs.swift-compatible == 'true') && (matrix.swift-config.build-mode == 'debug' || !inputs.with_release_mode_testing) }}
if: ${{ inputs.with_coverage && (steps.swift-check.outputs.swift-compatible == 'true') && (matrix.swift-config.build-mode == 'debug' || inputs.with_release_mode_testing) }}
uses: vapor/[email protected]
with:
codecov_token: ${{ secrets.CODECOV_TOKEN || '' }}
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/self-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ name: Self-test the reusable workflow
on:
workflow_dispatch:
inputs:
with_testing:
type: boolean
required: false
default: true
description: "Set to 'true' to enable compilation for testing and @testable imports. Defaults to 'true'."
with_release_mode_testing:
type: boolean
required: false
default: true
description: "Set to 'true' to enable testing in release mode as well. Defaults to 'false'."
with_coverage:
type: boolean
required: false
Expand All @@ -27,7 +37,7 @@ on:
required: false
default: true
description: "Set to 'true' to run CodeQL checks. Defaults to 'true'."
with_linting:
with_linting:
type: boolean
required: false
default: true
Expand Down Expand Up @@ -57,6 +67,8 @@ jobs:
call-workflow:
uses: ./.github/workflows/run-unit-tests.yml
with:
with_testing: ${{ inputs.with_testing || true }}
with_release_mode_testing: ${{ inputs.with_release_mode_testing || true }}
with_coverage: ${{ inputs.with_coverage || false }}
with_tsan: ${{ inputs.with_tsan || false }}
with_api_check: ${{ inputs.with_api_check || true }}
Expand Down

0 comments on commit 4324c2c

Please sign in to comment.