Skip to content

Fix up FluentKit tests after SQLKit update #994

Fix up FluentKit tests after SQLKit update

Fix up FluentKit tests after SQLKit update #994

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
POSTGRES_HOSTNAME: 'psql-a'
POSTGRES_HOSTNAME_A: 'psql-a'
POSTGRES_HOSTNAME_B: 'psql-b'
POSTGRES_DB: 'test_database'
POSTGRES_DB_A: 'test_database'
POSTGRES_DB_B: 'test_database'
POSTGRES_USER: 'test_username'
POSTGRES_USER_A: 'test_username'
POSTGRES_USER_B: 'test_username'
POSTGRES_PASSWORD: 'test_password'
POSTGRES_PASSWORD_A: 'test_password'
POSTGRES_PASSWORD_B: 'test_password'
MYSQL_HOSTNAME: 'mysql-a'
MYSQL_HOSTNAME_A: 'mysql-a'
MYSQL_HOSTNAME_B: 'mysql-b'
MYSQL_DATABASE: 'test_database'
MYSQL_DATABASE_A: 'test_database'
MYSQL_DATABASE_B: 'test_database'
MYSQL_USERNAME: 'test_username'
MYSQL_USERNAME_A: 'test_username'
MYSQL_USERNAME_B: 'test_username'
MYSQL_PASSWORD: 'test_password'
MYSQL_PASSWORD_A: 'test_password'
MYSQL_PASSWORD_B: 'test_password'
MONGO_HOSTNAME: 'mongo-a'
MONGO_HOSTNAME_A: 'mongo-a'
MONGO_HOSTNAME_B: 'mongo-b'
jobs:
linux-integration:
if: ${{ !(github.event.pull_request.draft || false) }}
runs-on: ubuntu-latest
container: swift:5.10-jammy
services:
mysql-a:
image: mysql:8
env: { MYSQL_ALLOW_EMPTY_PASSWORD: true, MYSQL_USER: test_username, MYSQL_PASSWORD: test_password, MYSQL_DATABASE: test_database }
mysql-b:
image: mysql:8
env: { MYSQL_ALLOW_EMPTY_PASSWORD: true, MYSQL_USER: test_username, MYSQL_PASSWORD: test_password, MYSQL_DATABASE: test_database }
psql-a:
image: postgres:16
env: {
POSTGRES_USER: test_username, POSTGRES_PASSWORD: test_password, POSTGRES_DB: test_database,
POSTGRES_HOST_AUTH_METHOD: scram-sha-256, POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
}
psql-b:
image: postgres:16
env: {
POSTGRES_USER: test_username, POSTGRES_PASSWORD: test_password, POSTGRES_DB: test_database,
POSTGRES_HOST_AUTH_METHOD: scram-sha-256, POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
}
mongo-a:
image: mongo:6
mongo-b:
image: mongo:6
strategy:
fail-fast: false
matrix:
include:
- { dependent: 'fluent-sqlite-driver', ref: 'main' }
- { dependent: 'fluent-postgres-driver', ref: 'main' }
- { dependent: 'fluent-mysql-driver', ref: 'main' }
- { dependent: 'fluent-mongo-driver', ref: 'main' }
steps:
- name: Check out package
uses: actions/checkout@v4
with:
path: fluent-kit
- name: Check out dependent
uses: actions/checkout@v4
with:
repository: vapor/${{ matrix.dependent }}
path: ${{ matrix.dependent }}
ref: ${{ matrix.ref }}
- name: Use local package and run tests
env:
DEPENDENT: ${{ matrix.dependent }}
run: |
swift package --package-path ${DEPENDENT} edit fluent-kit --path fluent-kit
swift test --package-path ${DEPENDENT}
unit-tests:
uses: vapor/ci/.github/workflows/run-unit-tests.yml@main
with:
coverage_ignores: '/Tests/|/Sources/FluentBenchmark/'