Skip to content

build(deps): Bump swift-actions/setup-swift from 2 to 3 #31

build(deps): Bump swift-actions/setup-swift from 2 to 3

build(deps): Bump swift-actions/setup-swift from 2 to 3 #31

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
swift: ['6.1']
steps:
- uses: actions/checkout@v4
- name: Setup Swift
uses: swift-actions/setup-swift@v3
with:
swift-version: ${{ matrix.swift }}
- name: Get swift version
run: swift --version
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v --enable-code-coverage
- name: Generate coverage report
if: matrix.os == 'ubuntu-latest'
run: |
swift test --enable-code-coverage
llvm-cov export -format="lcov" \
.build/debug/SwiftLRUCachePackageTests.xctest \
-instr-profile .build/debug/codecov/default.profdata > coverage.lcov
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v5
with:
file: ./coverage.lcov
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}