Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Scuderi committed Mar 30, 2024
1 parent a01ee49 commit 02147fa
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/swift-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ jobs:
swift-tests:
name: 'Swift Tests'
runs-on: ubuntu-latest
container: swift:5.10-jammy

# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
defaults:
run:
Expand All @@ -23,8 +21,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

# Run tests with Thread Sanitizer https://www.swift.org/blog/tsan-support-on-linux/
- name: Run tests with Thread Sanitizer
# Set up Swift
- uses: swift-actions/setup-swift@v2
with:
swift-version: "5.10"
- name: Get swift version
run: swift --version

# Run tests
- name: Run tests
run: swift test
- name: Coverage
run: |
Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
SWIFT_DOCKER_IMAGE = swift:5.10-jammy
MOUNT_ROOT=$(shell pwd)
SWIFT_BIN_PATH = $(shell swift build --show-bin-path)
TEST_PACKAGE= $(SWIFT_BIN_PATH)/SwiftSlsAdapterTestsPackageTests.xctest
BUILD_TEMP = .build/temp

docker_bash:
docker run \
-it \
--rm \
--volume "$(MOUNT_ROOT):/src" \
--workdir "/src/" \
$(SWIFT_DOCKER_IMAGE) \
/bin/bash

coverage:
llvm-cov export $(TEST_PACKAGE) \
--instr-profile=$(SWIFT_BIN_PATH)/codecov/default.profdata \
Expand Down

0 comments on commit 02147fa

Please sign in to comment.