Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Feb 13, 2024
1 parent 1023719 commit 18aa29f
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI

on:
push:
branches:
- main
- 2.x.x
paths:
- '**.swift'
- '**.yml'
pull_request:
branches:
- main
- 2.x.x
workflow_dispatch:

jobs:
# macOS:
# runs-on: macOS-13
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: SPM tests
# run: swift test --enable-code-coverage
# - name: Convert coverage files
# run: |
# xcrun llvm-cov export -format "lcov" \
# .build/debug/hummingbirdPackageTests.xctest/Contents/MacOs/hummingbirdPackageTests \
# -ignore-filename-regex="\/Tests\/" \
# -ignore-filename-regex="\/Benchmarks\/" \
# -instr-profile=.build/debug/codecov/default.profdata > info.lcov
# - name: Upload to codecov.io
# uses: codecov/codecov-action@v3
# with:
# file: info.lcov
linux:
runs-on: ubuntu-latest
strategy:
matrix:
image:
- 'swift:5.9'
- 'swiftlang/swift:nightly-5.10-jammy'

container:
image: ${{ matrix.image }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Test
run: |
swift test --enable-code-coverage
- name: Convert coverage files
run: |
llvm-cov export -format="lcov" \
.build/debug/hummingbirdPackageTests.xctest \
-ignore-filename-regex="\/Tests\/" \
-ignore-filename-regex="\/Benchmarks\/" \
-instr-profile .build/debug/codecov/default.profdata > info.lcov
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
file: info.lcov

0 comments on commit 18aa29f

Please sign in to comment.