Skip to content

We can stop breaking now #266

We can stop breaking now

We can stop breaking now #266

Workflow file for this run

name: CI
on:
pull_request:
schedule:
- cron: '3 3 * * 5' # 3:03 AM, every Friday
concurrency:
group: ${{ github.head_ref || 'push' }}
cancel-in-progress: true
jobs:
# we want to test more macOS versions but GitHub make that difficult without
# constant maintenance because runners are deprecated and removed
# apple:
# runs-on: macos-latest
# strategy:
# matrix:
# platform:
# - iOS
# - tvOS
# - macOS
# - watchOS
# steps:
# - uses: actions/checkout@v6
# - uses: mxcl/xcodebuild@latest
# with:
# platform: ${{ matrix.platform }}
# code-coverage: true
# - uses: codecov/codecov-action@v5
linux:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
swift:
# - swift:4.2
# - swift:5.0
# - swift:5.1
# - swift:5.2
# - swift:5.3
# - swift:5.4
# - swift:5.5
# - swift:5.6
# - swift:5.7
# - swift:5.8
# - swift:5.9
# - swift:5.10
# # - swift:6.0 strangely fails
# - swift:6.1
- swift:6.2
container:
image: ${{ matrix.swift }}
steps:
- uses: actions/checkout@v1
- name: Get Swift version
id: swift
run: |
ver=$(swift --version | head -1 | sed 's/.*Swift version \([0-9]*\).*/\1/')
echo "marketing-version=$ver" >> $GITHUB_OUTPUT
- run: useradd -ms /bin/bash mxcl
- run: chown -R mxcl .
# ^^ 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 > 6.1 }}
- run: su mxcl -c "swift test --parallel $ARGS"
- name: Generate `.lcov`
if: ${{ steps.swift.outputs.marketing-version > 6.1 }}
run: |
apt-get -qq update && apt-get -qq install curl
b=$(swift build --show-bin-path)
llvm-cov export \
-format lcov \
-instr-profile="$b"/codecov/default.profdata \
--ignore-filename-regex='\.build|Tests' \
"$b"/*.xctest \
> info.lcov
- uses: codecov/codecov-action@v1
if: ${{ steps.swift.outputs.marketing-version > 6.1 }}
with:
file: ./info.lcov