43
.github/workflows/ci.yml
vendored
43
.github/workflows/ci.yml
vendored
@@ -6,21 +6,26 @@ on:
|
||||
- .github/workflows/ci.yml
|
||||
schedule:
|
||||
- cron: '3 3 * * 5' # 3:03 AM, every Friday
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.head_ref || 'push' }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
smoke:
|
||||
runs-on: macos-latest
|
||||
verify-linuxmain:
|
||||
runs-on: macos-10.15
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: swift test --generate-linuxmain
|
||||
- run: git diff --exit-code
|
||||
|
||||
apple:
|
||||
runs-on: macos-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- macos-10.15
|
||||
- macos-11
|
||||
platform:
|
||||
- iOS
|
||||
- tvOS
|
||||
@@ -35,25 +40,13 @@ jobs:
|
||||
warnings-as-errors: true
|
||||
- uses: codecov/codecov-action@v1
|
||||
|
||||
linux-swift-4:
|
||||
name: linux (${{ matrix.swift }})
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
swift: ['4.2', '5.0']
|
||||
container:
|
||||
image: swift:${{ matrix.swift }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: useradd -ms /bin/bash mxcl
|
||||
- run: chown -R mxcl .
|
||||
- run: su mxcl -c 'swift test --parallel'
|
||||
|
||||
linux:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
swift:
|
||||
- swift:4.2
|
||||
- swift:5.0
|
||||
- swift:5.1
|
||||
- swift:5.2
|
||||
- swift:5.3
|
||||
@@ -62,12 +55,22 @@ jobs:
|
||||
container:
|
||||
image: ${{ matrix.swift }}
|
||||
steps:
|
||||
- uses: mxcl/get-swift-version@v1
|
||||
id: swift
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- run: useradd -ms /bin/bash mxcl
|
||||
# ^^ we need to be a normal user and not root for the tests to be valid
|
||||
- run: chown -R mxcl .
|
||||
- run: su mxcl -c 'swift test --parallel --enable-code-coverage'
|
||||
# ^^ we need to be a normal user and not root for the tests to be valid
|
||||
|
||||
- run: echo ARGS=--enable-code-coverage >> $GITHUB_ENV
|
||||
if: ${{ steps.swift.outputs.marketing-version > 5 }}
|
||||
|
||||
- run: su mxcl -c "swift test --parallel $ARGS"
|
||||
|
||||
- name: Generate `.lcov`
|
||||
if: ${{ steps.swift.outputs.marketing-version > 5 }}
|
||||
run: |
|
||||
apt-get -qq update && apt-get -qq install curl
|
||||
b=$(swift build --show-bin-path)
|
||||
@@ -77,6 +80,8 @@ jobs:
|
||||
--ignore-filename-regex='\.build|Tests' \
|
||||
"$b"/*.xctest \
|
||||
> info.lcov
|
||||
|
||||
- uses: codecov/codecov-action@v1
|
||||
if: ${{ steps.swift.outputs.marketing-version > 5 }}
|
||||
with:
|
||||
file: ./info.lcov
|
||||
|
||||
Reference in New Issue
Block a user