-
-
Notifications
You must be signed in to change notification settings - Fork 89
add postgres v18 for test #597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
zunda-pixel
wants to merge
3
commits into
vapor:main
Choose a base branch
from
zunda-pixel:add-postgres-18-test
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,9 @@ on: | |
| push: | ||
| branches: | ||
| - main | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
|
|
||
| jobs: | ||
| build-and-deploy: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,8 @@ on: | |
| - "*" | ||
| env: | ||
| LOG_LEVEL: info | ||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| linux-unit: | ||
|
|
@@ -37,11 +39,8 @@ jobs: | |
| - name: Check out package | ||
| uses: actions/checkout@v5 | ||
| - name: Run unit tests with Thread Sanitizer | ||
| shell: bash | ||
| run: | | ||
| # https://github.com/swiftlang/swift/issues/74042 was never fixed in 5.10 and swift-crypto hits it in 6.0 as well | ||
| SANITIZE="$([[ "${SWIFT_VERSION}" =~ ^swift-(5|6\.0) ]] || echo '--sanitize=thread')" | ||
| swift test --filter='^(PostgresNIOTests|ConnectionPoolModuleTests)' ${SANITIZE} --enable-code-coverage | ||
| swift test --filter='^(PostgresNIOTests|ConnectionPoolModuleTests)' --sanitize=thread --enable-code-coverage | ||
| - name: Submit code coverage | ||
| uses: vapor/[email protected] | ||
| with: | ||
|
|
@@ -52,15 +51,15 @@ jobs: | |
| fail-fast: false | ||
| matrix: | ||
| postgres-image: | ||
| - postgres:17 | ||
| - postgres:15 | ||
| - postgres:13 | ||
| - postgres:18 | ||
| - postgres:16 | ||
| - postgres:14 | ||
| include: | ||
| - postgres-image: postgres:17 | ||
| - postgres-image: postgres:18 | ||
| postgres-auth: scram-sha-256 | ||
| - postgres-image: postgres:15 | ||
| - postgres-image: postgres:16 | ||
| postgres-auth: md5 | ||
| - postgres-image: postgres:13 | ||
| - postgres-image: postgres:14 | ||
| postgres-auth: trust | ||
| container: | ||
| image: swift:6.2-noble | ||
|
|
@@ -69,30 +68,14 @@ jobs: | |
| env: | ||
| # Unfortunately, fluent-postgres-driver details leak through here | ||
| 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' | ||
| POSTGRES_HOSTNAME: 'psql-a' | ||
| POSTGRES_HOSTNAME_A: 'psql-a' | ||
zunda-pixel marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| POSTGRES_HOSTNAME_B: 'psql-b' | ||
| POSTGRES_SOCKET: '/var/run/postgresql/.s.PGSQL.5432' | ||
| POSTGRES_HOST_AUTH_METHOD: ${{ matrix.postgres-auth }} | ||
| services: | ||
| psql-a: | ||
| image: ${{ matrix.postgres-image }} | ||
| volumes: [ 'pgrunshare:/var/run/postgresql' ] | ||
| env: | ||
| POSTGRES_USER: 'test_username' | ||
| POSTGRES_DB: 'test_database' | ||
| POSTGRES_PASSWORD: 'test_password' | ||
| POSTGRES_HOST_AUTH_METHOD: ${{ matrix.postgres-auth }} | ||
| POSTGRES_INITDB_ARGS: --auth-host=${{ matrix.postgres-auth }} | ||
| psql-b: | ||
| psql-a: &psql_service_spec | ||
zunda-pixel marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| image: ${{ matrix.postgres-image }} | ||
| volumes: [ 'pgrunshare:/var/run/postgresql' ] | ||
| env: | ||
|
|
@@ -101,6 +84,7 @@ jobs: | |
| POSTGRES_PASSWORD: 'test_password' | ||
| POSTGRES_HOST_AUTH_METHOD: ${{ matrix.postgres-auth }} | ||
| POSTGRES_INITDB_ARGS: --auth-host=${{ matrix.postgres-auth }} | ||
| psql-b: *psql_service_spec | ||
| steps: | ||
| - name: Display OS and Swift versions | ||
| run: | | ||
|
|
@@ -133,18 +117,18 @@ jobs: | |
| matrix: | ||
| postgres-formula: | ||
| # Only test one version on macOS, let Linux do the rest | ||
| - postgresql@16 | ||
| - postgresql@17 | ||
| postgres-auth: | ||
| # Only test one auth method on macOS, Linux tests will cover the others | ||
| - scram-sha-256 | ||
| macos-version: | ||
| - 'macos-14' | ||
| - 'macos-15' | ||
| - macos-15 | ||
| - macos-26 | ||
| include: | ||
| - macos-version: 'macos-14' | ||
| xcode-version: 'latest-stable' | ||
| - macos-version: 'macos-15' | ||
| xcode-version: 'latest-stable' | ||
| - 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 | ||
|
|
@@ -161,16 +145,19 @@ jobs: | |
| xcode-version: ${{ matrix.xcode-version }} | ||
| - name: Install Postgres, setup DB and auth, and wait for server start | ||
| run: | | ||
| export PATH="$(brew --prefix)/opt/${POSTGRES_FORMULA}/bin:$PATH" PGDATA=/tmp/vapor-postgres-test | ||
| brew install --overwrite "${POSTGRES_FORMULA}" | ||
| brew link --overwrite --force "${POSTGRES_FORMULA}" | ||
| export PGDATA=/tmp/vapor-postgres-test | ||
zunda-pixel marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| brew install --overwrite "${POSTGRES_FORMULA}" && brew link --overwrite --force "${POSTGRES_FORMULA}" | ||
| initdb --locale=C --auth-host "${POSTGRES_AUTH_METHOD}" -U "${POSTGRES_USER}" --pwfile=<(echo "${POSTGRES_PASSWORD}") | ||
| pg_ctl start --wait | ||
| timeout-minutes: 15 | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
| - name: Run all tests | ||
| run: swift test | ||
| run: swift test --enable-code-coverage | ||
| - name: Submit code coverage | ||
| uses: vapor/[email protected] | ||
| with: | ||
| codecov_token: ${{ secrets.CODECOV_TOKEN }} | ||
|
|
||
| api-breakage: | ||
| if: github.event_name == 'pull_request' | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.