-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Massive pass across the entirety of SQLKit to: - Fix, correct, clarify, add, and streamline documentation comments across the board. - Use `any` in all places it should appear. - Normalize coding style (esp. omitting unneeded `return`s and consistent use of `self.`). - Add `@inlinable` and `@usableFromInline` to a significant amount of the API, hopefully improving performance - Fix some minor copy-pasta bugs, primarily in SQLCreateTrigger - Deprecate use of non-trivial raw SQL strings outside of SQLQueryString or SQLRaw * Update README - had a LOT of old stuff in it
- Loading branch information
Showing
99 changed files
with
2,177 additions
and
2,714 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,47 +1,15 @@ | ||
name: test | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
on: | ||
pull_request: { branches: ['*'] } | ||
push: { branches: ['main'] } | ||
|
||
env: | ||
LOG_LEVEL: debug | ||
LOG_LEVEL: info | ||
SWIFT_DETERMINISTIC_HASHING: 1 | ||
|
||
jobs: | ||
# Baseline test run for code coverage stats | ||
codecov: | ||
runs-on: ubuntu-latest | ||
container: swift:5.7-jammy | ||
steps: | ||
- name: Check out package | ||
uses: actions/checkout@v3 | ||
- name: Run local tests with coverage | ||
run: swift test --enable-code-coverage | ||
- name: Submit coverage report to Codecov.io | ||
uses: vapor/[email protected] | ||
with: | ||
cc_flags: 'unittests' | ||
cc_env_vars: 'SWIFT_VERSION,SWIFT_PLATFORM,RUNNER_OS,RUNNER_ARCH,POSTGRES_VERSION' | ||
cc_fail_ci_if_error: true | ||
cc_verbose: true | ||
cc_dry_run: false | ||
|
||
# Check for API breakage versus main | ||
api-breakage: | ||
if: ${{ github.event_name == 'pull_request' }} | ||
runs-on: ubuntu-latest | ||
container: swift:5.8-jammy | ||
steps: | ||
- name: Check out package | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
# https://github.com/actions/checkout/issues/766 | ||
- name: Mark the workspace as safe | ||
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} | ||
- name: Check for API breaking changes | ||
run: swift package diagnose-api-breaking-changes origin/main | ||
|
||
unit-tests: | ||
uses: vapor/ci/.github/workflows/run-unit-tests.yml@reusable-workflows | ||
with: | ||
|
@@ -100,11 +68,18 @@ jobs: | |
MYSQL_HOSTNAME_A: mysql-a | ||
MYSQL_HOSTNAME_B: mysql-b | ||
steps: | ||
- name: Install SQLite dependencies | ||
run: apt-get -q update && apt-get -q install -y libsqlite3-dev | ||
- name: Check out sql-kit | ||
uses: actions/checkout@v3 | ||
with: { path: sql-kit } | ||
- name: Check out sqlite-kit | ||
uses: actions/checkout@v3 | ||
with: { repository: 'vapor/sqlite-kit', path: sqlite-kit } | ||
- name: Check out postgres-kit | ||
uses: actions/checkout@v3 | ||
with: { repository: 'vapor/postgres-kit', path: postgres-kit } | ||
- name: Check out mysql-kit | ||
uses: actions/checkout@v3 | ||
with: { repository: 'vapor/mysql-kit', path: mysql-kit } | ||
- name: Check out fluent-sqlite-driver | ||
uses: actions/checkout@v3 | ||
with: { repository: 'vapor/fluent-sqlite-driver', path: fluent-sqlite-driver } | ||
|
@@ -115,28 +90,29 @@ jobs: | |
uses: actions/checkout@v3 | ||
with: { repository: 'vapor/fluent-mysql-driver', path: fluent-mysql-driver } | ||
|
||
- name: Use sql-kit in sqlite-kit | ||
run: swift package --package-path sqlite-kit edit sql-kit --path sql-kit | ||
- name: Use sql-kit in postgres-kit | ||
run: swift package --package-path postgres-kit edit sql-kit --path sql-kit | ||
- name: Use sql-kit in mysql-kit | ||
run: swift package --package-path mysql-kit edit sql-kit --path sql-kit | ||
- name: Use sql-kit in fluent-sqlite-driver | ||
run: swift package --package-path fluent-sqlite-driver edit sql-kit --path sql-kit | ||
- name: Use sql-kit in fluent-postgres-driver | ||
run: swift package --package-path fluent-postgres-driver edit sql-kit --path sql-kit | ||
- name: Use sql-kit in fluent-myql-driver | ||
- name: Use sql-kit in fluent-mysql-driver | ||
run: swift package --package-path fluent-mysql-driver edit sql-kit --path sql-kit | ||
|
||
- name: Run sqlite-kit tests with Thread Sanitizer | ||
run: swift test --package-path sqlite-kit --sanitize=thread | ||
- name: Run postgres-kit tests with Thread Sanitizer | ||
run: swift test --package-path postgres-kit --sanitize=thread | ||
- name: Run mysql-kit tests with Thread Sanitizer | ||
run: swift test --package-path mysql-kit --sanitize=thread | ||
|
||
- name: Run fluent-sqlite-driver tests with Thread Sanitizer | ||
run: swift test --package-path fluent-sqlite-driver | ||
run: swift test --package-path fluent-sqlite-driver --sanitize=thread | ||
- name: Run fluent-postgres-driver tests with Thread Sanitizer | ||
run: swift test --package-path fluent-postgres-driver --sanitize=thread | ||
- name: Run fluent-mysql-driver tests with Thread Sanitizer | ||
run: swift test --package-path fluent-mysql-driver --sanitize=thread | ||
|
||
test-exports: | ||
name: Test exports | ||
runs-on: ubuntu-latest | ||
container: swift:5.8-jammy | ||
steps: | ||
- name: Check out Vapor | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Build | ||
run: swift build -Xswiftc -DBUILDING_DOCC |
Oops, something went wrong.