-
-
Notifications
You must be signed in to change notification settings - Fork 83
58 lines (54 loc) · 1.3 KB
/
ci.yml
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
name: CI
on:
push:
branches:
- main
- 7.x.x
paths:
- '**.swift'
pull_request:
paths:
- '**.swift'
- '**.yml'
workflow_dispatch:
env:
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DISABLE_LOCALSTACK : "false"
AWS_ENABLE_LOGGING : "true"
AWS_LOG_LEVEL: "debug"
STRICT_CONCURRENCY: "true"
jobs:
macos:
runs-on: macOS-13
steps:
- name: Checkout
uses: actions/checkout@v4
- name: SPM build
run: swift build
linux:
runs-on: ubuntu-latest
strategy:
matrix:
image:
- swift:5.9
- swift:5.10
- swift:6.0
services:
localstack:
image: localstack/localstack
container:
image: ${{ matrix.image }}
env:
LOCALSTACK_ENDPOINT : "http://localstack:4566"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test Resource Prefix
# set AWS_TEST_RESOURCE_PREFIX environment variable to a random series of 8 letters
run: |
echo AWS_TEST_RESOURCE_PREFIX=$(cat /dev/urandom | tr -dc 'a-z' | head -c 8) >> $GITHUB_ENV
- name: Test
# Cannot run in parallel as APIGateway tests fail occasionally
run: |
swift test --enable-test-discovery