Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* New works-for-everything CI This version of the test workflow can be pasted without changes into any repo whose tests don't have additional dependencies and don't need to separately test that they're still Vapor-compatible (such as console-kit). Improvements over existing CI: - Runs on pushes to master as well as PRs - Full coverage of all available Swift runner images for Linux - Uses latest Xcode without hardcoding on macOS - Nice names for each test step - Nice name for the workflow itself * Apply suggestions from code review
- Loading branch information
Showing
1 changed file
with
44 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,49 @@ | ||
name: test | ||
name: Test Matrix | ||
|
||
on: | ||
- pull_request | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
vapor_macos: | ||
runs-on: macos-latest | ||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_11.4.1.app/Contents/Developer | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: xcrun swift test --enable-test-discovery --sanitize=thread | ||
vapor_xenial: | ||
container: | ||
image: vapor/swift:5.2-xenial | ||
|
||
Linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
image: | ||
- swift:5.2-xenial | ||
- swift:5.2-bionic | ||
- swiftlang/swift:nightly-5.2-xenial | ||
- swiftlang/swift:nightly-5.2-bionic | ||
- swiftlang/swift:nightly-5.3-xenial | ||
- swiftlang/swift:nightly-5.3-bionic | ||
- swiftlang/swift:nightly-master-xenial | ||
- swiftlang/swift:nightly-master-bionic | ||
- swiftlang/swift:nightly-master-focal | ||
include: | ||
- image: swiftlang/swift:nightly-master-centos8 | ||
depscmd: dnf install -y zlib-devel | ||
- image: swiftlang/swift:nightly-master-amazonlinux2 | ||
depscmd: yum install -y zlib-devel | ||
container: ${{ matrix.image }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: swift test --enable-test-discovery --sanitize=thread | ||
vapor_bionic: | ||
container: | ||
image: vapor/swift:5.2-bionic | ||
runs-on: ubuntu-latest | ||
- name: Install dependencies if needed | ||
run: ${{ matrix.depscmd }} | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
- name: Run tests with Thread Sanitizer | ||
run: swift test --enable-test-discovery --sanitize=thread | ||
|
||
macOS: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: swift test --enable-test-discovery --sanitize=thread | ||
- name: Select latest available Xcode | ||
uses: maxim-lobanov/setup-xcode@1.0 | ||
with: { 'xcode-version': 'latest' } | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
- name: Run tests with Thread Sanitizer | ||
run: swift test --enable-test-discovery --sanitize=thread |