Skip to content

Commit

Permalink
ci: setup
Browse files Browse the repository at this point in the history
  • Loading branch information
alephao committed Sep 18, 2024
1 parent be72fef commit 70f40f0
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on:
push:
branches:
- main
paths:
- '**.yml'
- '**.swift'
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-ci
cancel-in-progress: true

jobs:
linux:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
image: ["swift:5.8", "swift:5.9", "swift:5.10", "swift:6.0"]

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

0 comments on commit 70f40f0

Please sign in to comment.