Skip to content

Commit 0d43093

Browse files
authored
Merge pull request #67 from mattpolzin/test-grid
update GitHub Actions workflow to use a test matrix.
2 parents 1b5ed1e + 38069b3 commit 0d43093

1 file changed

Lines changed: 31 additions & 12 deletions

File tree

.github/workflows/tests.yml

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,38 @@
11
name: Tests
22

3-
on: [push]
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
48

59
jobs:
6-
xenial_5_2:
7-
container:
8-
image: swift:5.2-xenial
10+
linux:
911
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
image:
16+
- swift:5.2-xenial
17+
- swift:5.2-bionic
18+
- swiftlang/swift:nightly-master-focal
19+
- swiftlang/swift:nightly-master-centos8
20+
- swiftlang/swift:nightly-master-amazonlinux2
21+
container: ${{ matrix.image }}
1022
steps:
11-
- uses: actions/checkout@v1
12-
- run: swift test --enable-test-discovery
13-
bionic_5_2:
14-
container:
15-
image: swift:5.2-bionic
16-
runs-on: ubuntu-latest
23+
- name: Install dependencies if needed
24+
run: ${{ matrix.depscmd }}
25+
- name: Checkout code
26+
uses: actions/checkout@v2
27+
- name: Run tests
28+
run: swift test --enable-test-discovery
29+
osx:
30+
runs-on: macOS-latest
1731
steps:
18-
- uses: actions/checkout@v1
19-
- run: swift test --enable-test-discovery
32+
- name: Select latest available Xcode
33+
uses: maxim-lobanov/setup-xcode@1.0
34+
with: { 'xcode-version': 'latest' }
35+
- name: Checkout code
36+
uses: actions/checkout@v2
37+
- name: Run tests
38+
run: swift test --enable-test-discovery

0 commit comments

Comments
 (0)