Skip to content

Add options to enable all or disable default traits when testing #299

Add options to enable all or disable default traits when testing

Add options to enable all or disable default traits when testing #299

Workflow file for this run

name: Self-test the reusable workflow
on:
workflow_dispatch:
inputs:
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
default: true
description: "Set to 'true' to collect and upload code coverage data. Defaults to 'false'."
with_tsan:
type: boolean
required: false
default: true
description: "Set to 'true' to run tests with Thread Sanitizer. Defaults to 'true'."
warnings_as_errors:
type: boolean
required: false
default: true
description: "Set to 'true' to treat warnings as errors. Defaults to 'true'."
with_api_check:
type: boolean
required: false
default: true
description: "Set to 'true' to run the SwiftPM public API breakage check. Defaults to 'true'."
with_linting:
type: boolean
required: false
default: true
description: "Set to 'true' to run swift-format's lint process. Defaults to 'true'."
with_platform:
type: choice
options:
- all
- windows
- musl
- wasm
- android
required: false
default: all
description: "Select which platform to test, or select 'all' to test all platforms"
ios_scheme_name:
type: string
required: false
default: 'sample-testable-package-Package'
description: "Set to the scheme name in Xcode to run tests on iOS. Defaults to 'sample-testable-package', use '' to not run any tests."
pull_request: { branches: [ main ] }
push: { branches: [ main ] }
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
call-workflow:
uses: ./.github/workflows/run-unit-tests.yml
with:
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 }}
warnings_as_errors: ${{ inputs.warnings_as_errors || true }}
with_linting: ${{ inputs.with_linting || true }}
with_windows: ${{ inputs.with_platform == 'all' || inputs.with_platform == 'windows' || true }}
with_musl: ${{ inputs.with_platform == 'all' || inputs.with_platform == 'musl' || true }}
with_wasm: ${{ inputs.with_platform == 'all' || inputs.with_platform == 'wasm' || true }}
with_android: ${{ inputs.with_platform == 'all' || inputs.with_platform == 'android'|| true }}
ios_scheme_name: ${{ inputs.ios_scheme_name || 'sample-testable-package-Package' }}