mirror of
https://github.com/swift-server/swift-openapi-lambda.git
synced 2026-06-02 07:27:32 +00:00
use swiftlang CI workflow
add license check add readme build badge
This commit is contained in:
@@ -1,32 +1,55 @@
|
||||
# This workflow will build a Swift project on macOS and Linux
|
||||
# This workflow will build a Swift project on macOS and Linux
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
|
||||
name: swift-openapi-lambda-build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
|
||||
jobs:
|
||||
build-macos:
|
||||
env:
|
||||
# https://github.com/actions/runner-images/tree/main/images/macos
|
||||
DEVELOPER_DIR: /Applications/Xcode_16.app/Contents/Developer
|
||||
|
||||
runs-on: macos-15-arm64
|
||||
# runs-on: macos-15
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build
|
||||
run: swift build -v
|
||||
- name: Run tests
|
||||
run: swift test -v
|
||||
build-linux:
|
||||
soundness:
|
||||
name: Soundness
|
||||
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
|
||||
with:
|
||||
# do not use SwiftLang's license header check because the copyright for this project is Amazon.com + contributors
|
||||
license_header_check_enabled: false
|
||||
license_header_check_project_name: "Swift OpenAPI Lambda"
|
||||
shell_check_enabled: false
|
||||
python_lint_check_enabled: false
|
||||
api_breakage_check_container_image: "swift:6.0-noble"
|
||||
docs_check_container_image: "swift:6.0-noble"
|
||||
format_check_container_image: "swiftlang/swift:nightly-6.0-jammy"
|
||||
|
||||
license:
|
||||
name: License headers check
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build
|
||||
run: swift build -v
|
||||
- name: Run tests
|
||||
run: swift test -v
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Mark the workspace as safe
|
||||
# https://github.com/actions/checkout/issues/766
|
||||
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
||||
- name: License headers check
|
||||
env:
|
||||
PROJECT_NAME: "Swift OpenAPI Lambda"
|
||||
run: |
|
||||
./scripts/check-license-headers.sh
|
||||
|
||||
unit-tests:
|
||||
name: Unit tests
|
||||
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
|
||||
with:
|
||||
linux_5_9_enabled: false
|
||||
linux_5_10_enabled: true
|
||||
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
|
||||
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"
|
||||
|
||||
swift-6-language-mode:
|
||||
name: Swift 6 Language Mode
|
||||
uses: apple/swift-nio/.github/workflows/swift_6_language_mode.yml@main
|
||||
|
||||
Reference in New Issue
Block a user