Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add with_nightly_swift config option #19

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ on:
required: false
default: true
description: "Set to 'true' to submit a dependency graph to Github. Defaults to 'true'."
with_nightly_swift:
type: boolean
required: false
default: true
description: "Set to 'true' to perform tests on Swift nightly images too. Defaults to 'true'."
extra_flags:
type: string
required: false
Expand All @@ -49,7 +54,7 @@ env:
TEST_FILTER: ${{ inputs.test_filter != '' && format('--filter={0}', inputs.test_filter) || '' }}

# We use the unversioned "jammy" docker tag to specify the "latest" Swift release in several jobs.
jobs:
jobs:
api-breakage:
if: ${{ inputs.with_public_api_check && !(github.event.pull_request.draft || false) && github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
Expand All @@ -63,7 +68,7 @@ jobs:
run: |
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
swift package ${PACKAGE_ROOT} diagnose-api-breaking-changes origin/main ${EXTRA_FLAGS}

dependency-graph:
if: ${{ inputs.with_deps_submission && github.event_name == 'push' }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -99,7 +104,7 @@ jobs:
codecov_token: ${{ secrets.CODECOV_TOKEN || '' }}
package_path: ${{ inputs.package_root }}
build_parameters: ${{ inputs.extra_flags }}

gh-codeql:
if: ${{ (false && inputs.with_gh_codeql) && !(github.event.pull_request.draft || false) }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -128,7 +133,7 @@ jobs:
- name: Run CodeQL analyze
if: ${{ steps.swift-check.outputs.swift-compatible == 'true' }}
uses: github/codeql-action/analyze@v3

linux-unit:
if: ${{ !(github.event.pull_request.draft || false) }}
strategy:
Expand All @@ -152,7 +157,7 @@ jobs:
with:
package_root: ${{ inputs.package_root }}
- name: Run unit tests
if: ${{ steps.swift-check.outputs.swift-compatible == 'true' }}
if: ${{ steps.swift-check.outputs.swift-compatible == 'true' && (inputs.with_nightly_swift || !contains(matrix.swift-image, 'nightly')) }}
run: |
SWIFT_DETERMINISTIC_HASHING=1 swift test ${PACKAGE_ROOT} ${WITH_TSAN} ${TEST_FILTER} ${EXTRA_FLAGS}

Expand Down