Version 3.0.0 #410
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: ['*'] | |
jobs: | |
linux: | |
name: Linux SPM unit tests | |
runs-on: ubuntu-latest | |
container: | |
image: swift:6.0 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Swift version | |
id: swift-version | |
run: | | |
echo "SWIFT_VERSION=$(swift --version|head -1|cut -d' ' -f3)" >> $GITHUB_ENV | |
shell: bash | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: .build | |
key: ${{ runner.os }}-spm6-${{ env.SWIFT_VERSION }}-${{ hashFiles('Package.resolved', 'Makefile') }} | |
- name: Run tests | |
run: swift test | |
macos: | |
name: macOS 14 tests | |
runs-on: macos-14 | |
steps: | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '16.0' | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: .build | |
key: ${{ runner.os }}-spm5-${{ hashFiles('Package.resolved', 'Makefile') }} | |
- name: SPM tests | |
run: make test | |
- name: Normalize coverage info | |
run: xcrun llvm-cov export -format lcov .build/debug/swift-sassPackageTests.xctest/Contents/MacOS/swift-sassPackageTests -instr-profile .build/debug/codecov/default.profdata -ignore-filename-regex "(Test|checkouts|pb\.swift$)" > coverage.lcov | |
- name: Upload coverage | |
uses: codecov/codecov-action@v2 | |
with: | |
files: ./coverage.lcov | |
verbose: true |