Skip to content

Commit 908f6ef

Browse files
author
Andrea Scuderi
committed
Update GitHub actions
1 parent f59be5a commit 908f6ef

File tree

3 files changed

+42
-2
lines changed

3 files changed

+42
-2
lines changed

.github/workflows/meterian.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# .github/workflows/meterian.yml
2+
3+
name: Meterian Scanner workflow
4+
5+
on: push
6+
7+
jobs:
8+
meterian_scan:
9+
name: Meterian client scan
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: swift-actions/setup-swift@v2
13+
with:
14+
swift-version: "5.7.3"
15+
- name: Get swift version
16+
run: swift --version
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
- name: Generate Package.resolved
20+
run: swift package resolve
21+
- name: Meterian Scanner
22+
uses: MeterianHQ/[email protected]
23+
with:
24+
oss: true
25+
cli_args: --tags=swift

.github/workflows/swift-test.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
swift-tests:
1212
name: 'Swift Tests'
1313
runs-on: ubuntu-latest
14-
container: swift:5.7-jammy
14+
container: swift:5.10-jammy
1515

1616
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
1717
defaults:
@@ -25,4 +25,11 @@ jobs:
2525

2626
# Run tests with Thread Sanitizer https://www.swift.org/blog/tsan-support-on-linux/
2727
- name: Run tests with Thread Sanitizer
28-
run: swift test --sanitize=thread
28+
run: swift test
29+
- name: Coverage
30+
run: |
31+
make coverage
32+
- name: Upload Code Coverage
33+
uses: codecov/codecov-action@v3
34+
with:
35+
files: ${{ github.workspace }}/lcov.info

Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
SWIFT_BIN_PATH = $(shell swift build --show-bin-path)
2+
TEST_PACKAGE= $(SWIFT_BIN_PATH)/SLSAdapterTestsPackageTests.xctest
3+
BUILD_TEMP = .build/temp
4+
5+
coverage:
6+
llvm-cov export $(TEST_PACKAGE) \
7+
--instr-profile=$(SWIFT_BIN_PATH)/codecov/default.profdata \
8+
--format=lcov > $(GITHUB_WORKSPACE)/lcov.info

0 commit comments

Comments
 (0)