Skip to content

Commit

Permalink
better CI
Browse files Browse the repository at this point in the history
  • Loading branch information
MahdiBM committed Oct 28, 2024
1 parent 2a15de9 commit e54d3b4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ jobs:
- swiftlang/swift:nightly-main-jammy
config:
- mode: "debug"
args: "--enable-code-coverage"
build_args: ""
test_args: "--enable-code-coverage"
with_codecov: true
- mode: "release"
args: "-c release -Xswiftc -enable-testing"
build_args: "-Xswiftc -enable-testing"
test_args: "-Xswiftc -enable-testing"
with_codecov: false

runs-on: ubuntu-latest
Expand All @@ -43,7 +45,7 @@ jobs:
restore-keys: "${{ github.event.repository.name }}-${{ matrix.config.mode }}-build-${{ matrix.swift-image }}-${{ runner.os }}-"

- name: Build ${{ github.event.repository.name }}
run: swift build --build-tests
run: swift build --build-tests -c ${{ matrix.config.mode }} ${{ matrix.config.build_args }}

- name: Cache .build
if: steps.restore-cache.outputs.cache-hit != 'true'
Expand All @@ -53,7 +55,7 @@ jobs:
key: "${{ github.event.repository.name }}-${{ matrix.config.mode }}-build-${{ matrix.swift-image }}-${{ runner.os }}-${{ hashFiles('./Package.resolved') }}"

- name: Run tests
run: swift test ${{ matrix.config.args }} --parallel
run: swift test --parallel -c ${{ matrix.config.mode }} ${{ matrix.config.test_args }}

- name: Submit code coverage
if: matrix.config.with_codecov == 'true'
Expand Down

0 comments on commit e54d3b4

Please sign in to comment.