File tree 4 files changed +31
-10
lines changed
4 files changed +31
-10
lines changed Original file line number Diff line number Diff line change 2
2
3
3
name : Meterian Scanner workflow
4
4
5
- on : push
5
+ on :
6
+ push :
7
+ branches :
8
+ - main
6
9
7
10
jobs :
8
11
meterian_scan :
Original file line number Diff line number Diff line change 11
11
swift-tests :
12
12
name : ' Swift Tests'
13
13
runs-on : ubuntu-latest
14
- container : swift:5.10-jammy
15
-
16
14
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
17
15
defaults :
18
16
run :
@@ -23,12 +21,18 @@ jobs:
23
21
- name : Checkout
24
22
uses : actions/checkout@v3
25
23
26
- # Run tests with Thread Sanitizer https://www.swift.org/blog/tsan-support-on-linux/
27
- - name : Run tests with Thread Sanitizer
28
- run : swift test
24
+ # Set up Swift
25
+ - uses : swift-actions/setup-swift@v2
26
+ with :
27
+ swift-version : " 5.10"
28
+ - name : Get swift version
29
+ run : swift --version
30
+
31
+ # Run tests
32
+ - name : Run tests
33
+ run : make test
29
34
- name : Coverage
30
- run : |
31
- make coverage
35
+ run : make coverage
32
36
- name : Upload Code Coverage
33
37
uses : codecov/codecov-action@v3
34
38
with :
Original file line number Diff line number Diff line change
1
+ SWIFT_DOCKER_IMAGE = swift:5.10-jammy
2
+ MOUNT_ROOT =$(shell pwd)
1
3
SWIFT_BIN_PATH = $(shell swift build --show-bin-path)
2
- TEST_PACKAGE = $(SWIFT_BIN_PATH ) /SLSAdapterTestsPackageTests .xctest
4
+ TEST_PACKAGE = $(SWIFT_BIN_PATH ) /swift-sls-adapterPackageTests .xctest
3
5
BUILD_TEMP = .build/temp
4
6
7
+ docker_bash :
8
+ docker run \
9
+ -it \
10
+ --rm \
11
+ --volume " $( MOUNT_ROOT) :/src" \
12
+ --workdir " /src/" \
13
+ $(SWIFT_DOCKER_IMAGE ) \
14
+ /bin/bash
15
+
16
+ test :
17
+ swift test --enable-code-coverage
18
+
5
19
coverage :
6
20
llvm-cov export $(TEST_PACKAGE ) \
7
21
--instr-profile=$(SWIFT_BIN_PATH ) /codecov/default.profdata \
Original file line number Diff line number Diff line change 1
1
# swift-sls-adapter
2
- [ ![ ] ( https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fswift-serverless%2Fswift-sls-adapter%2Fbadge%3Ftype%3Dswift-versions )] ( https://swiftpackageindex.com/swift-serverless/swift-sls-adapter ) [ ![ ] ( https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fswift-serverless%2Fswift-sls-adapter%2Fbadge%3Ftype%3Dplatforms )] ( https://swiftpackageindex.com/swift-serverless/swift-sls-adapter ) [ ![ Swift test] ( https://github.com/swift-serverless/swift-sls-adapter/actions/workflows/swift-test.yml/badge.svg )] ( https://github.com/swift-serverless/swift-sls-adapter/actions/workflows/swift-test.yml ) [ ![ security status] ( https://www.meterian.io/badge/gh/swift-serverless/swift-sls-adapter/security?branch=main )] ( https://www.meterian.io/report/gh/swift-serverless/swift-sls-adapter )
2
+ [ ![ ] ( https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fswift-serverless%2Fswift-sls-adapter%2Fbadge%3Ftype%3Dswift-versions )] ( https://swiftpackageindex.com/swift-serverless/swift-sls-adapter ) [ ![ ] ( https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fswift-serverless%2Fswift-sls-adapter%2Fbadge%3Ftype%3Dplatforms )] ( https://swiftpackageindex.com/swift-serverless/swift-sls-adapter ) [ ![ Swift test] ( https://github.com/swift-serverless/swift-sls-adapter/actions/workflows/swift-test.yml/badge.svg )] ( https://github.com/swift-serverless/swift-sls-adapter/actions/workflows/swift-test.yml ) [ ![ codecov ] ( https://codecov.io/gh/swift-serverless/swift-sls-adapter/branch/main/graph/badge.svg?token=PJR7YGBSQ0 )] ( https://codecov.io/gh/swift-serverless/swift-sls-adapter ) [ ![ security status] ( https://www.meterian.io/badge/gh/swift-serverless/swift-sls-adapter/security?branch=main )] ( https://www.meterian.io/report/gh/swift-serverless/swift-sls-adapter )
3
3
[ ![ stability status] ( https://www.meterian.io/badge/gh/swift-serverless/swift-sls-adapter/stability?branch=main )] ( https://www.meterian.io/report/gh/swift-serverless/swift-sls-adapter )
4
4
[ ![ licensing status] ( https://www.meterian.io/badge/gh/swift-serverless/swift-sls-adapter/licensing?branch=main )] ( https://www.meterian.io/report/gh/swift-serverless/swift-sls-adapter )
5
5
You can’t perform that action at this time.
0 commit comments