File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ name : Run unit tests
3+ on :
4+ pull_request :
5+ push :
6+ branches : [master]
7+ jobs :
8+ test_on_Linux :
9+ name : Build and Test on Linux
10+ strategy :
11+ matrix :
12+ swift-version : ["5.3"]
13+ runs-on : Ubuntu-18.04
14+ steps :
15+ - uses : actions/checkout@v2
16+ - name : Setup swiftenv
17+ run : |
18+ git clone https://github.com/kylef/swiftenv.git ~/.swiftenv
19+ export SWIFTENV_ROOT="$HOME/.swiftenv"
20+ export PATH="$SWIFTENV_ROOT/bin:$PATH"
21+ eval "$(swiftenv init -)"
22+ echo "$PATH" >> $GITHUB_PATH
23+ - name : Install Swift
24+ run : swiftenv install "${{ matrix.swift-version }}" --skip-existing
25+ - run : swift --version
26+ - run : swift test --enable-test-discovery
27+ test_on_macOS :
28+ name : Build and Test on macOS
29+ strategy :
30+ matrix :
31+ xcode-version :
32+ - /Applications/Xcode_12.app
33+ runs-on : macOS-10.15
34+ steps :
35+ - uses : actions/checkout@v2
36+ - run : sudo xcode-select -s "${{ matrix.xcode-version }}"
37+ - run : swift --version
38+ - run : swift test
39+ coverage :
40+ name : Collect test coverage
41+ runs-on : macOS-10.15
42+ steps :
43+ - uses : actions/checkout@v2
44+ - run : swift test --enable-code-coverage
45+ - run : echo "SWIFT_CODECOV_PATH=$(swift test --show-codecov-path)" >> $GITHUB_ENV
46+ - uses : codecov/codecov-action@v1
47+ with :
48+ file : ${{ env.SWIFT_CODECOV_PATH }}
You can’t perform that action at this time.
0 commit comments