-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop support for Swift 5.2/5.3 + Yet another CI overhaul (#226)
* Overhaul the CI a bit; drops old Swift version support along the way
- Loading branch information
Showing
3 changed files
with
159 additions
and
55 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Update code coverage baselines | ||
on: | ||
push: { branches: [ main ] } | ||
jobs: | ||
update-main-codecov: | ||
strategy: | ||
matrix: { dbimage: ['postgres:14'], dbauth: ['scram-sha-256'] } | ||
runs-on: ubuntu-latest | ||
container: swift:5.6-focal | ||
env: | ||
LOG_LEVEL: debug | ||
POSTGRES_HOSTNAME: 'psql' | ||
POSTGRES_DB: 'test_database' | ||
POSTGRES_USER: 'test_username' | ||
POSTGRES_PASSWORD: 'test_password' | ||
services: | ||
psql: | ||
image: ${{ matrix.dbimage }} | ||
env: | ||
POSTGRES_USER: 'test_username' | ||
POSTGRES_DB: 'test_database' | ||
POSTGRES_PASSWORD: 'test_password' | ||
POSTGRES_HOST_AUTH_METHOD: ${{ matrix.dbauth }} | ||
POSTGRES_INITDB_ARGS: --auth-host=${{ matrix.dbauth }} | ||
steps: | ||
- name: Save Postgres version and method to env | ||
run: echo POSTGRES_INFO='${{ toJSON(matrix) }}' >> $GITHUB_ENV | ||
- 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/swift-codecov-action@v0.2 | ||
with: | ||
cc_flags: 'unittests' | ||
cc_env_vars: 'SWIFT_VERSION,SWIFT_PLATFORM,RUNNER_OS,RUNNER_ARCH,POSTGRES_INFO' | ||
cc_fail_ci_if_error: true | ||
cc_verbose: true | ||
cc_dry_run: false | ||
|
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,4 +1,4 @@ | ||
// swift-tools-version:5.2 | ||
// swift-tools-version:5.4 | ||
import PackageDescription | ||
|
||
let package = Package( | ||
|