Skip to content

Bump swiftlang/github-workflows/.github/workflows/swift_package_test.… #151

Bump swiftlang/github-workflows/.github/workflows/swift_package_test.…

Bump swiftlang/github-workflows/.github/workflows/swift_package_test.… #151

Workflow file for this run

name: CI
permissions:
contents: read
on:
workflow_dispatch:
push:
branches: ["main", "release/**"]
pull_request:
branches: ["main", "release/**"]
types: [opened, reopened, synchronize]
# Pushing changes to PR stops currently-running CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
SWIFTLINT_VERSION: 0.61.0
SWIFTFORMAT_VERSION: 0.58.1
jobs:
soundness:
name: soundness
# Note: this commit is used in soundness & swifttests workflows, so they should be kept in sync
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@e96b1ad30d9a253d7bd9d253b2e4ef189965dd3d # 0.0.7
with:
# https://github.com/swiftlang/swift-package-manager/issues/8103
api_breakage_check_enabled: false
format_check_enabled: false
tests:
name: swifttests
# Note: this commit is used in soundness & swifttests workflows, so they should be kept in sync
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@61db6917df4ec2ddeeb493757e2d1effd46af855 # 0.0.8
with:
# https://github.com/apple/swift-distributed-tracing/issues/165
enable_windows_checks: false
linux_exclude_swift_versions: "[{\"swift_version\": \"5.9\"}, {\"swift_version\": \"5.10\"}]"
linux_build_command: "swift test --configuration release"
pre-commit:
timeout-minutes: 1
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install pre-commit
run: pip install pre-commit
- name: Pre-commit checks
# CI will commit to `main`
# swiftformat, swiftlint and license checks tested separately
run: >
SKIP=no-commit-to-branch,check-doc-comments,lockwood-swiftformat,swiftlint,insert-license
pre-commit run --all-files
insert-license:
timeout-minutes: 1
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Install pre-commit
run: pip install pre-commit
- name: List changed files
run: git diff --name-only HEAD~1
- name: Run license check
run: pre-commit run insert-license --files $(git diff --name-only HEAD~1)
lint:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Cache SwiftLint
id: cache-swiftlint
uses: actions/cache@v5
with:
path: /tmp/swiftlint/SwiftLint/.build/debug/swiftlint
key: ${{ runner.os }}-swiftlint-${{ env.SWIFTLINT_VERSION }}
- name: Install SwiftLint
if: steps.cache-swiftlint.outputs.cache-hit != 'true'
run: |
ci/install-swiftlint.sh
- name: Run SwiftLint
run: /tmp/swiftlint/SwiftLint/.build/debug/swiftlint lint --strict .
lockwood-swiftformat:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Cache SwiftFormat
id: cache-swiftformat
uses: actions/cache@v5
with:
path: /tmp/swiftformat/SwiftFormat/.build/release/swiftformat
key: ${{ runner.os }}-swiftformat-${{ env.SWIFTFORMAT_VERSION }}
- name: Install Lockwood SwiftFormat
if: steps.cache-swiftformat.outputs.cache-hit != 'true'
run: |
ci/install-lockwood-swiftformat.sh
- name: Run SwiftFormat
run: /tmp/swiftformat/SwiftFormat/.build/release/swiftformat --strict .