-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Support Async Lifecycles #214
Merged
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b644b23
Add 5.9 manifest with strict concurrency
0xTim 1f09318
Add async lifecycle handler function
0xTim 8ba9246
Fix a ton of Sendable warnings
0xTim 85f5305
Rework RedisStorage
0xTim 7584fa6
Silence some warnings
0xTim 501fd7b
Fix Sendable warnings
0xTim 0389820
Update CI
0xTim 8863f7e
Fine
0xTim 14f0bb0
Modernize/fix CI
gwynne 13da97b
Disable CodeQL for now
0xTim 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 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,4 +11,4 @@ jobs: | |
with: | ||
package_name: redis | ||
modules: Redis | ||
pathsToInvalidate: /redis | ||
pathsToInvalidate: /redis/* |
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 |
---|---|---|
|
@@ -17,24 +17,47 @@ jobs: | |
api-breakage: | ||
if: ${{ !(github.event.pull_request.draft || false) }} | ||
runs-on: ubuntu-latest | ||
container: swift:5.8-jammy | ||
container: swift:jammy | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: { 'fetch-depth': 0 } | ||
- name: Run API breakage check action | ||
uses: vapor/ci/.github/actions/ci-swift-check-api-breakage@reusable-workflows | ||
- name: Run API breakage check | ||
run: | | ||
git config --global --add safe.directory "${GITHUB_WORKSPACE}" | ||
swift package diagnose-api-breaking-changes origin/main | ||
|
||
gh-codeql: | ||
if: ${{ !(github.event.pull_request.draft || false) }} | ||
runs-on: ubuntu-latest | ||
permissions: { actions: write, contents: read, security-events: write } | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Install latest Swift toolchain | ||
uses: vapor/[email protected] | ||
with: { toolchain: latest } | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Fix Git configuration | ||
run: 'git config --global --add safe.directory "${GITHUB_WORKSPACE}"' | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: { languages: swift } | ||
- name: Perform build | ||
run: swift build | ||
- name: Run CodeQL analyze | ||
uses: github/codeql-action/analyze@v3 | ||
|
||
linux-unit: | ||
if: ${{ !(github.event.pull_request.draft || false) }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
container: | ||
- swift:5.6-focal | ||
- swift:5.7-jammy | ||
- swift:5.8-jammy | ||
- swiftlang/swift:nightly-5.9-jammy | ||
- swift:5.8-focal | ||
- swift:5.9-jammy | ||
- swift:5.10-jammy | ||
- swiftlang/swift:nightly-6.0-jammy | ||
- swiftlang/swift:nightly-main-jammy | ||
redis: | ||
- redis:6 | ||
|
@@ -47,22 +70,11 @@ jobs: | |
redis-2: | ||
image: ${{ matrix.redis }} | ||
steps: | ||
- name: Save Redis version to env | ||
run: | | ||
echo REDIS_VERSION='${{ matrix.redis }}' >> $GITHUB_ENV | ||
- name: Display versions | ||
shell: bash | ||
run: | | ||
if [[ '${{ contains(matrix.container, 'nightly') }}' == 'true' ]]; then | ||
SWIFT_PLATFORM="$(source /etc/os-release && echo "${ID}${VERSION_ID}")" SWIFT_VERSION="$(cat /.swift_tag)" | ||
printf 'SWIFT_PLATFORM=%s\nSWIFT_VERSION=%s\n' "${SWIFT_PLATFORM}" "${SWIFT_VERSION}" >>"${GITHUB_ENV}" | ||
fi | ||
printf 'OS: %s\nTag: %s\nVersion:\n' "${SWIFT_PLATFORM}-${RUNNER_ARCH}" "${SWIFT_VERSION}" && swift --version | ||
- name: Check out package | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Run unit tests with Thread Sanitizer and coverage | ||
run: swift test --sanitize=thread --enable-code-coverage | ||
- name: Submit coverage report to Codecov.io | ||
uses: vapor/swift-codecov-action@v0.2 | ||
- name: Upload coverage data | ||
uses: vapor/swift-codecov-action@v0.3 | ||
with: | ||
cc_env_vars: 'SWIFT_VERSION,SWIFT_PLATFORM,RUNNER_OS,RUNNER_ARCH,REDIS_VERSION' | ||
codecov_token: ${{ secrets.CODECOV_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// swift-tools-version:5.9 | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "redis", | ||
platforms: [ | ||
.macOS(.v10_15), | ||
.iOS(.v13), | ||
.tvOS(.v13), | ||
.watchOS(.v6), | ||
], | ||
products: [ | ||
.library(name: "Redis", targets: ["Redis"]) | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/swift-server/RediStack.git", from: "1.4.1"), | ||
.package(url: "https://github.com/vapor/vapor.git", from: "4.100.0"), | ||
], | ||
targets: [ | ||
.target( | ||
name: "Redis", | ||
dependencies: [ | ||
.product(name: "RediStack", package: "RediStack"), | ||
.product(name: "Vapor", package: "vapor"), | ||
], | ||
swiftSettings: [.enableExperimentalFeature("StrictConcurrency=complete")] | ||
), | ||
.testTarget( | ||
name: "RedisTests", | ||
dependencies: [ | ||
.target(name: "Redis"), | ||
.product(name: "XCTVapor", package: "vapor"), | ||
], | ||
swiftSettings: [.enableExperimentalFeature("StrictConcurrency=complete")] | ||
) | ||
] | ||
) |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL's still broken, pull this back out