Skip to content

Commit

Permalink
ci: add ci jobs test and codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
alephao committed Sep 14, 2024
1 parent dca139f commit 4e5abfa
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
branches:
- main
paths:
- '**.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", "swiftlang/swift:nightly-6.0-jammy"]

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-http-types-htmxPackageTests.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

0 comments on commit 4e5abfa

Please sign in to comment.