Skip to content

Commit ab1c09b

Browse files
committed
Swift: add workflow, lowering required Swift version to 5.9
1 parent 14870ec commit ab1c09b

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

.github/workflows/swift.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Swift CI
2+
3+
on:
4+
schedule:
5+
# each fifteen day of month
6+
- cron: "0 0 15 * *"
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- "swift/**"
12+
- ".github/workflows/swift.yml"
13+
pull_request:
14+
branches:
15+
- main
16+
paths:
17+
- "swift/**"
18+
- ".github/workflows/swift.yml"
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: all tests except the expected failing one
28+
working-directory: swift
29+
run: |
30+
# Run all tests, excluding the one we expect to fail.
31+
swift test --skip "paid"
32+
33+
- name: expected failing test
34+
working-directory: swift
35+
run: |
36+
# This test should fail due to the bug in the isPaid method.
37+
if swift test --filter "paid"; then
38+
echo "::error::Test unexpectedly passed!"
39+
exit 1
40+
else
41+
echo "Test failed as expected - bug still exists"
42+
fi

swift/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 6.0
1+
// swift-tools-version: 5.9
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription

0 commit comments

Comments
 (0)