Skip to content

Bump vapor/swift-codecov-action from 0.3.5 to 0.3.6 in the dependencies group #279

Bump vapor/swift-codecov-action from 0.3.5 to 0.3.6 in the dependencies group

Bump vapor/swift-codecov-action from 0.3.5 to 0.3.6 in the dependencies group #279

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 ] }
permissions:
contents: read
env:
LOG_LEVEL: info
POSTGRES_HOSTNAME_A: &postgres_host_a 'psql-a'
POSTGRES_HOSTNAME_B: &postgres_host_b 'psql-b'
POSTGRES_HOSTNAME: *postgres_host_a
POSTGRES_DB_A: &postgres_db_a 'test_database'
POSTGRES_DB_B: &postgres_db_b 'test_database'
POSTGRES_DB: *postgres_db_a
POSTGRES_USER_A: &postgres_user_a 'test_username'
POSTGRES_USER_B: &postgres_user_b 'test_username'
POSTGRES_USER: *postgres_user_a
POSTGRES_PASSWORD_A: &postgres_pass_a 'test_password'
POSTGRES_PASSWORD_B: &postgres_pass_b 'test_password'
POSTGRES_PASSWORD: *postgres_pass_a
jobs:
api-breakage:
if: ${{ github.event_name == 'pull_request' && !(github.event.pull_request.draft || false) }}
runs-on: ubuntu-latest
container: swift:noble
steps:
- name: Checkout
uses: actions/checkout@v7
with: { 'fetch-depth': 0 }
- name: API breaking changes
run: |
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
swift package diagnose-api-breaking-changes origin/main
linux-unit:
if: ${{ !(github.event.pull_request.draft || false) }}
strategy:
fail-fast: false
matrix:
postgres-image:
- postgres:18
- postgres:16
- postgres:14
swift-image:
- swift:6.1-noble
- swift:6.2-noble
- swift:6.3-noble
include:
- postgres-image: postgres:18
postgres-auth: scram-sha-256
- postgres-image: postgres:16
postgres-auth: md5
- postgres-image: postgres:14
postgres-auth: trust
runs-on: ubuntu-latest
container: ${{ matrix.swift-image }}
services:
*postgres_host_a:
image: ${{ matrix.postgres-image }}
env:
POSTGRES_USER: *postgres_user_a
POSTGRES_DB: *postgres_db_a
POSTGRES_PASSWORD: *postgres_pass_a
POSTGRES_HOST_AUTH_METHOD: ${{ matrix.postgres-auth }}
POSTGRES_INITDB_ARGS: --auth-host=${{ matrix.postgres-auth }}
steps:
- name: Install curl
run: apt-get update -y -q && apt-get install -y curl
- name: Check out package
uses: actions/checkout@v7
- name: Run local tests
run: swift test --enable-code-coverage --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable
- name: Upload coverage data
uses: vapor/swift-codecov-action@855faf6b50974544c7ab3da724f49e602e43edc6 # v0.3.6
with:
codecov_token: ${{ secrets.CODECOV_TOKEN || '' }}
linux-integration:
if: ${{ !(github.event.pull_request.draft || false) }}
runs-on: ubuntu-latest
container: swift:6.3-noble
services:
*postgres_host_a:
image: postgres:18
env:
POSTGRES_USER: *postgres_user_a
POSTGRES_DB: *postgres_db_a
POSTGRES_PASSWORD: *postgres_pass_a
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
*postgres_host_b:
image: postgres:16
env:
POSTGRES_USER: *postgres_user_b
POSTGRES_DB: *postgres_db_b
POSTGRES_PASSWORD: *postgres_pass_b
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
steps:
- name: Check out package
uses: actions/checkout@v7
with: { path: 'postgres-kit' }
- name: Check out fluent-postgres-driver dependent
uses: actions/checkout@v7
with: { repository: 'vapor/fluent-postgres-driver', path: 'fluent-postgres-driver' }
- name: Use local package
run: swift package --package-path fluent-postgres-driver edit postgres-kit --path postgres-kit
- name: Run fluent-postgres-kit tests
run: swift test --package-path fluent-postgres-driver
macos-unit:
if: ${{ !(github.event.pull_request.draft || false) }}
strategy:
fail-fast: false
matrix:
include:
- macos-version: macos-15
xcode-version: latest-stable
- macos-version: macos-26
xcode-version: latest-stable
runs-on: ${{ matrix.macos-version }}
env:
POSTGRES_HOSTNAME: 127.0.0.1
POSTGRES_DB: postgres
steps:
- name: Select latest available Xcode
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1.7.0
with:
xcode-version: ${{ matrix.xcode-version }}
- name: Install Postgres, setup DB and auth, and wait for server start
run: |
brew upgrade || true
export PGDATA=/tmp/vapor-postgres-test
brew install "postgresql@18" && brew link --force "postgresql@18"
initdb --locale=C --auth-host "scram-sha-256" -U "${POSTGRES_USER}" --pwfile=<(echo "${POSTGRES_PASSWORD}")
pg_ctl start --wait
timeout-minutes: 15
- name: Checkout code
uses: actions/checkout@v7
- name: Run local tests
run: swift test --enable-code-coverage --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable
- name: Upload coverage data
uses: vapor/swift-codecov-action@855faf6b50974544c7ab3da724f49e602e43edc6 # v0.3.6
with:
codecov_token: ${{ secrets.CODECOV_TOKEN || '' }}
musl:
runs-on: ubuntu-latest
container: swift:6.3-noble
timeout-minutes: 30
steps:
- name: Check out code
uses: actions/checkout@v7
- name: Install linux dependencies
run: apt-get update && apt-get install -y curl jq
- name: Install SDK
run: |
version_num="$(swiftc --version | grep -oE '[0-9]+\.[0-9]+(\.[0-9]+)?' | head -1)"
tag="swift-${version_num}-RELEASE"
sdk_info="$(curl -s https://www.swift.org/api/v1/install/releases.json | jq -r --arg tag "$tag" '.[] | select(.tag == $tag).platforms[] | select(.platform == "static-sdk") | [.version, .checksum] | @tsv')"
version="$(echo "$sdk_info" | cut -f1)"
checksum="$(echo "$sdk_info" | cut -f2)"
swift sdk install "https://download.swift.org/$(echo $tag | tr [A-Z] [a-z])/static-sdk/$tag/${tag}_static-linux-${version}.artifactbundle.tar.gz" --checksum "$checksum"
- name: Build
run: swift build --swift-sdk x86_64-swift-linux-musl