Skip to content

Add hasNext and hasPrevious properties #984

Add hasNext and hasPrevious properties

Add hasNext and hasPrevious properties #984

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.8-jammy
services:
mysql-a:
image: mysql:8.0
env: { MYSQL_ALLOW_EMPTY_PASSWORD: true, MYSQL_USER: test_username, MYSQL_PASSWORD: test_password, MYSQL_DATABASE: test_database }
mysql-b:
image: mysql:8.0
env: { MYSQL_ALLOW_EMPTY_PASSWORD: true, MYSQL_USER: test_username, MYSQL_PASSWORD: test_password, MYSQL_DATABASE: test_database }
psql-a:
image: postgres:15
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:15
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@v3
with:
path: fluent-kit
- name: Check out dependent
uses: actions/checkout@v3
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}
# also serves as code coverage baseline update
unit-tests:
uses: vapor/ci/.github/workflows/run-unit-tests.yml@main
with:
with_coverage: true
with_tsan: true
coverage_ignores: '/Tests/|/Sources/FluentBenchmark/'