#continuous-resilience
This commit is contained in:
9
.github/workflows/checks.yml
vendored
9
.github/workflows/checks.yml
vendored
@@ -1,14 +1,13 @@
|
|||||||
name: Checks
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
paths:
|
paths:
|
||||||
- Sources/**
|
- '**/*.swift'
|
||||||
- Tests/**
|
- .github/workflows/checks.yml
|
||||||
jobs:
|
jobs:
|
||||||
macOS:
|
smoke:
|
||||||
runs-on: macos-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: swift --version
|
- run: swift --version
|
||||||
|
|||||||
66
.github/workflows/ci.yml
vendored
66
.github/workflows/ci.yml
vendored
@@ -1,5 +1,11 @@
|
|||||||
name: CI
|
name: CI
|
||||||
on: pull_request
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '**/*.swift'
|
||||||
|
- .github/workflows/ci.yml
|
||||||
|
schedule:
|
||||||
|
- cron: '3 3 * * 5' # 3:03 AM, every Friday
|
||||||
jobs:
|
jobs:
|
||||||
smoke:
|
smoke:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
@@ -10,7 +16,7 @@ jobs:
|
|||||||
- run: git diff --exit-code
|
- run: git diff --exit-code
|
||||||
|
|
||||||
apple:
|
apple:
|
||||||
runs-on: macos-latest
|
runs-on: macos-10.15
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
destination:
|
destination:
|
||||||
@@ -34,50 +40,46 @@ jobs:
|
|||||||
- uses: codecov/codecov-action@v1
|
- uses: codecov/codecov-action@v1
|
||||||
|
|
||||||
linux-swift-4:
|
linux-swift-4:
|
||||||
name: linux (4.2)
|
name: linux (${{ matrix.swift }})
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
swift: ['4.2', '5.0']
|
||||||
|
container:
|
||||||
|
image: swift:${{ matrix.swift }}
|
||||||
steps:
|
steps:
|
||||||
- uses: fwal/setup-swift@v1
|
|
||||||
with:
|
|
||||||
swift-version: 4.2
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: swift test --parallel
|
- run: useradd -ms /bin/bash mxcl
|
||||||
|
- run: chown -R mxcl .
|
||||||
|
- run: su mxcl -c 'swift test --parallel'
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
swift:
|
swift:
|
||||||
- '5.0'
|
|
||||||
- '5.1'
|
- '5.1'
|
||||||
- '5.2'
|
- '5.2'
|
||||||
- '5.3'
|
- '5.3'
|
||||||
|
- '5.4'
|
||||||
|
container:
|
||||||
|
image: swift:${{ matrix.swift }}
|
||||||
steps:
|
steps:
|
||||||
- uses: fwal/setup-swift@v1
|
|
||||||
with:
|
|
||||||
swift-version: ${{ matrix.swift }}
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: swift test --parallel --enable-code-coverage
|
- run: useradd -ms /bin/bash mxcl
|
||||||
- name: Generate Coverage Report
|
# ^^ 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'
|
||||||
|
- name: Generate `.lcov`
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -qq update && sudo apt-get -qq install llvm-10
|
apt-get -qq update && apt-get -qq install curl
|
||||||
export b=$(swift build --show-bin-path) && llvm-cov-10 \
|
b=$(swift build --show-bin-path)
|
||||||
export -format lcov \
|
llvm-cov export \
|
||||||
-instr-profile=$b/codecov/default.profdata \
|
-format lcov \
|
||||||
--ignore-filename-regex='\.build/' \
|
-instr-profile="$b"/codecov/default.profdata \
|
||||||
$b/Path.swiftPackageTests.xctest \
|
--ignore-filename-regex='\.build|Tests' \
|
||||||
|
"$b"/*.xctest \
|
||||||
> info.lcov
|
> info.lcov
|
||||||
- uses: codecov/codecov-action@v1
|
- uses: codecov/codecov-action@v1
|
||||||
with:
|
with:
|
||||||
file: ./info.lcov
|
file: ./info.lcov
|
||||||
|
|
||||||
# code coverage fails with 5.4 for some reason
|
|
||||||
linux-swift-5-4:
|
|
||||||
name: linux (5.4)
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
steps:
|
|
||||||
- uses: fwal/setup-swift@v1
|
|
||||||
with:
|
|
||||||
swift-version: 5.4
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- run: swift test --parallel
|
|
||||||
|
|||||||
Reference in New Issue
Block a user