Skip to content

fix ci

fix ci #314

Workflow file for this run

name: CI
on:
workflow_dispatch:
workflow_call:
pull_request:
paths:
- Sources/**
- Tests/**
- .github/workflows/ci.yml
- PromiseKit.xcodeproj/**
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
swift:
- '4.0'
- '4.1'
- '4.2'
- '5.0'
- '5.1'
- '5.2'
- '5.3'
- '5.4'
- '5.5'
- '5.6'
- '5.7'
- '5.8'
- '5.9'
- '5.10'
- '6.0'
container:
image: swift:${{ matrix.swift }}
steps:
- uses: actions/checkout@v1 # DO NOT UPDATE, IT WILL FAIL DUE TO GLIBC
- run: swift build -Xswiftc -warnings-as-errors -Xswiftc -swift-version -Xswiftc 3
if: ${{ matrix.swift < 5 }}
- run: swift build -Xswiftc -warnings-as-errors -Xswiftc -swift-version -Xswiftc 4
if: ${{ matrix.swift < 6 }}
- run: swift build -Xswiftc -warnings-as-errors -Xswiftc -swift-version -Xswiftc 4.2
if: ${{ matrix.swift < 6 }}
- run: swift test --enable-code-coverage --parallel
- name: Generate Coverage Report
if: ${{ matrix.swift < 5.4 }} # fails for SOME REASON
run: |
apt-get -qq update
apt-get -qq install llvm-10 curl
export b=$(swift build --show-bin-path) && llvm-cov-10 \
export -format lcov \
-instr-profile=$b/codecov/default.profdata \
--ignore-filename-regex='\.build/' \
$b/*.xctest \
> info.lcov
- uses: codecov/codecov-action@v1
with:
file: ./info.lcov
if: ${{ matrix.swift >= 6 }}
test:
runs-on: macos-latest
name: test (${{ matrix.platform }})
strategy:
matrix:
platform:
- macOS
- watchOS
- tvOS
- iOS
# - mac-catalyst
# - visionOS
steps:
- uses: actions/checkout@v4
- uses: mxcl/xcodebuild@v3
with:
platform: ${{ matrix.platform }}
code-coverage: true
- uses: codecov/codecov-action@v1
test-android:
name: test (Android)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: skiptools/swift-android-action@v2