-
-
Notifications
You must be signed in to change notification settings - Fork 64
executable file
·60 lines (58 loc) · 1.71 KB
/
test.yml
File metadata and controls
executable file
·60 lines (58 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request: { types: [opened, reopened, synchronize, ready_for_review] }
push: { branches: [ main ] }
env:
LOG_LEVEL: info
REDIS_HOSTNAME: redis
REDIS_PORT: 6379
REDIS_HOSTNAME_2: redis-2
REDIS_PORT_2: 6379
jobs:
api-breakage:
if: ${{ !(github.event.pull_request.draft || false) }}
runs-on: ubuntu-latest
container: swift
steps:
- name: Check out code
uses: actions/checkout@v5
with: { 'fetch-depth': 0 }
- name: Run API breakage check
run: |
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
swift package diagnose-api-breaking-changes origin/main
linux-unit:
if: ${{ !(github.event.pull_request.draft || false) }}
strategy:
fail-fast: false
matrix:
container:
- swift:5.10-jammy
- swift:6.0-noble
- swift:6.1-noble
- swiftlang/swift:nightly-6.2-noble
- swiftlang/swift:nightly-main-noble
redis:
- redis:6
- redis:7
runs-on: ubuntu-latest
container: ${{ matrix.container }}
services:
redis:
image: ${{ matrix.redis }}
redis-2:
image: ${{ matrix.redis }}
steps:
- name: Install curl
run: apt-get update -yq && apt-get install -y curl
- name: Check out package
uses: actions/checkout@v5
- name: Run unit tests with Thread Sanitizer and coverage
run: swift test --sanitize=thread --enable-code-coverage
- name: Upload coverage data
uses: vapor/swift-codecov-action@v0.3
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}