Skip to content

Commit 09fac77

Browse files
authored
Misc cleanups (#40)
* Update projectboard.yml * Update test.yml * Update Exports.swift * Delete .swift-version * Update Package.swift (min Swift and package versions) * Update README.md
1 parent fe81158 commit 09fac77

File tree

6 files changed

+58
-63
lines changed

6 files changed

+58
-63
lines changed

Diff for: .github/workflows/projectboard.yml

+4-24
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,7 @@ on:
55
types: [reopened, closed, labeled, unlabeled, assigned, unassigned]
66

77
jobs:
8-
setup_matrix_input:
9-
runs-on: ubuntu-latest
10-
11-
steps:
12-
- id: set-matrix
13-
run: |
14-
output=$(curl ${{ github.event.issue.url }}/labels | jq '.[] | .name') || output=""
15-
16-
echo '======================'
17-
echo 'Process incoming data'
18-
echo '======================'
19-
json=$(echo $output | sed 's/"\s"/","/g')
20-
echo $json
21-
echo "::set-output name=matrix::$(echo $json)"
22-
outputs:
23-
issueTags: ${{ steps.set-matrix.outputs.matrix }}
24-
25-
Manage_project_issues:
26-
needs: setup_matrix_input
27-
uses: vapor/ci/.github/workflows/issues-to-project-board.yml@main
28-
with:
29-
labelsJson: ${{ needs.setup_matrix_input.outputs.issueTags }}
30-
secrets:
31-
PROJECT_BOARD_AUTOMATION_PAT: "${{ secrets.PROJECT_BOARD_AUTOMATION_PAT }}"
8+
update_project_boards:
9+
name: Update project boards
10+
uses: vapor/ci/.github/workflows/update-project-boards-for-issue.yml@reusable-workflows
11+
secrets: inherit

Diff for: .github/workflows/test.yml

+38-29
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,66 @@
11
name: test
2+
concurrency:
3+
group: ${{ github.workflow }}-${{ github.ref }}
4+
cancel-in-progress: true
25
on:
3-
pull_request: { branches: ['*'] }
4-
push: { branches: ['main'] }
6+
pull_request: { types: [opened, reopened, synchronize, ready_for_review] }
7+
push: { branches: [ main ] }
58

69
env:
7-
LOG_LEVEL: debug
10+
LOG_LEVEL: info
811
SWIFT_DETERMINISTIC_HASHING: 1
912
REDIS_HOSTNAME: redis
1013

1114
jobs:
1215
api-breakage:
13-
if: github.event_name == 'pull_request'
16+
if: ${{ !(github.event.pull_request.draft || false) }}
1417
runs-on: ubuntu-latest
15-
container: swift:5.7-jammy
18+
container: swift:5.8-jammy
1619
steps:
17-
- name: Check out package
20+
- name: Check out code
1821
uses: actions/checkout@v3
19-
with:
20-
fetch-depth: 0
21-
# https://github.com/actions/checkout/issues/766
22-
- name: Mark the workspace as safe
23-
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
24-
- name: Check for API breaking changes
25-
run: swift package diagnose-api-breaking-changes origin/main
22+
with: { 'fetch-depth': 0 }
23+
- name: Run API breakage check action
24+
uses: vapor/ci/.github/actions/ci-swift-check-api-breakage@reusable-workflows
2625

2726
linux-unit:
27+
if: ${{ !(github.event.pull_request.draft || false) }}
2828
strategy:
2929
fail-fast: false
3030
matrix:
3131
container:
32-
- swift:5.5-bionic
3332
- swift:5.6-focal
3433
- swift:5.7-jammy
34+
- swift:5.8-jammy
35+
- swiftlang/swift:nightly-5.9-jammy
36+
- swiftlang/swift:nightly-main-jammy
37+
redis:
38+
- redis:6
39+
- redis:7
40+
runs-on: ubuntu-latest
3541
container: ${{ matrix.container }}
3642
services:
3743
redis:
38-
image: redis:6
44+
image: ${{ matrix.redis }}
3945
ports: ["6379:6379"]
40-
runs-on: ubuntu-latest
4146
steps:
47+
- name: Save Redis version to env
48+
run: |
49+
echo REDIS_VERSION='${{ matrix.redis }}' >> $GITHUB_ENV
50+
- name: Display versions
51+
shell: bash
52+
run: |
53+
if [[ '${{ contains(matrix.container, 'nightly') }}' == 'true' ]]; then
54+
SWIFT_PLATFORM="$(source /etc/os-release && echo "${ID}${VERSION_ID}")" SWIFT_VERSION="$(cat /.swift_tag)"
55+
printf 'SWIFT_PLATFORM=%s\nSWIFT_VERSION=%s\n' "${SWIFT_PLATFORM}" "${SWIFT_VERSION}" >>"${GITHUB_ENV}"
56+
fi
57+
printf 'OS: %s\nTag: %s\nVersion:\n' "${SWIFT_PLATFORM}-${RUNNER_ARCH}" "${SWIFT_VERSION}" && swift --version
4258
- name: Check out package
4359
uses: actions/checkout@v3
44-
- name: Run unit tests with Thread Sanitizer
45-
run: swift test --sanitize=thread
46-
47-
# TODO: Use reusable workflow
48-
test-exports:
49-
name: Test exports
50-
runs-on: ubuntu-latest
51-
steps:
52-
- name: Check out source
53-
uses: actions/checkout@v3
60+
- name: Run unit tests with Thread Sanitizer and coverage
61+
run: swift test --sanitize=thread --enable-code-coverage
62+
- name: Submit coverage report to Codecov.io
63+
uses: vapor/[email protected]
5464
with:
55-
fetch-depth: 0
56-
- name: Build
57-
run: swift build -Xswiftc -DBUILDING_DOCC
65+
cc_env_vars: 'SWIFT_VERSION,SWIFT_PLATFORM,RUNNER_OS,RUNNER_ARCH,REDIS_VERSION'
66+
cc_fail_ci_if_error: false

Diff for: .swift-version

-1
This file was deleted.

Diff for: Package.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.5.2
1+
// swift-tools-version:5.6
22
import PackageDescription
33

44
let package = Package(
@@ -16,9 +16,9 @@ let package = Package(
1616
)
1717
],
1818
dependencies: [
19-
.package(url: "https://github.com/vapor/vapor.git", from: "4.0.0"),
20-
.package(url: "https://github.com/vapor/queues.git", from: "1.0.0"),
21-
.package(url: "https://github.com/vapor/redis.git", from: "4.0.0"),
19+
.package(url: "https://github.com/vapor/vapor.git", from: "4.76.3"),
20+
.package(url: "https://github.com/vapor/queues.git", from: "1.12.1"),
21+
.package(url: "https://github.com/vapor/redis.git", from: "4.8.0"),
2222
],
2323
targets: [
2424
.target(

Diff for: README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@
1515
<a href="LICENSE">
1616
<img src="http://img.shields.io/badge/license-MIT-brightgreen.svg" alt="MIT License">
1717
</a>
18-
<a href="https://github.com/vapor/queues-redis-driver/actions">
19-
<img src="https://github.com/vapor/queues-redis-driver/workflows/test/badge.svg" alt="Continuous Integration">
18+
<a href="https://github.com/vapor/queues-redis-driver/actions/workflows/test.yml">
19+
<img src="https://github.com/vapor/queues-redis-driver/actions/workflows/test.yml/badge.svg?event=push" alt="Continuous Integration">
2020
</a>
2121
<a href="https://swift.org">
22-
<img src="http://img.shields.io/badge/swift-5.5-brightgreen.svg" alt="Swift 5.5">
22+
<img src="http://img.shields.io/badge/swift-5.6-brightgreen.svg" alt="Swift 5.6">
23+
</a>
24+
<a href="https://swift.org">
25+
<img src="http://img.shields.io/badge/swift-5.8-brightgreen.svg" alt="Swift 5.8">
2326
</a>
2427
</p>

Diff for: Sources/QueuesRedisDriver/Exports.swift

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
#if !BUILDING_DOCC
1+
#if swift(>=5.8)
2+
3+
@_documentation(visibility: internal) @_exported import Redis
4+
5+
#else
26

37
@_exported import Redis
48

5-
#endif
9+
#endif

0 commit comments

Comments
 (0)