Skip to content

Support Async Lifecycles #151

Support Async Lifecycles

Support Async Lifecycles #151

Workflow file for this run

name: test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request: { types: [opened, reopened, synchronize, ready_for_review] }
push: { branches: [ main ] }
env:
LOG_LEVEL: info
SWIFT_DETERMINISTIC_HASHING: 1
REDIS_HOSTNAME: redis
REDIS_PORT: 6379
REDIS_HOSTNAME_2: redis-2
REDIS_PORT_2: 6379
jobs:
api-breakage:
if: ${{ !(github.event.pull_request.draft || false) }}
runs-on: ubuntu-latest
container: swift:jammy
steps:
- name: Check out code
uses: actions/checkout@v4
with: { 'fetch-depth': 0 }
- name: Run API breakage check
run: |
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
swift package diagnose-api-breaking-changes origin/main
# gh-codeql:
# if: ${{ !(github.event.pull_request.draft || false) }}
# runs-on: ubuntu-latest
# permissions: { actions: write, contents: read, security-events: write }
# timeout-minutes: 30
# steps:
# - name: Install latest Swift toolchain
# uses: vapor/swiftly-action@v0.1
# with: { toolchain: latest }
# - name: Check out code
# uses: actions/checkout@v4
# - name: Fix Git configuration
# run: 'git config --global --add safe.directory "${GITHUB_WORKSPACE}"'
# - name: Initialize CodeQL
# uses: github/codeql-action/init@v3
# with: { languages: swift }
# - name: Perform build
# run: swift build
# - name: Run CodeQL analyze
# uses: github/codeql-action/analyze@v3
linux-unit:
if: ${{ !(github.event.pull_request.draft || false) }}
strategy:
fail-fast: false
matrix:
container:
- swift:5.8-focal
- swift:5.9-jammy
- swift:5.10-jammy
- swiftlang/swift:nightly-6.0-jammy
- swiftlang/swift:nightly-main-jammy
redis:
- redis:6
- redis:7
runs-on: ubuntu-latest
container: ${{ matrix.container }}
services:
redis:
image: ${{ matrix.redis }}
redis-2:
image: ${{ matrix.redis }}
steps:
- name: Check out package
uses: actions/checkout@v4
- name: Run unit tests with Thread Sanitizer and coverage
run: swift test --sanitize=thread --enable-code-coverage
- name: Upload coverage data
uses: vapor/swift-codecov-action@v0.3
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}