-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (69 loc) · 2.07 KB
/
coverage.yml
File metadata and controls
73 lines (69 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Coverage
on:
pull_request:
paths-ignore:
- 'docs/**'
push:
branches:
- main
paths-ignore:
- 'docs/**'
jobs:
coverage-mac-clang:
timeout-minutes: 30
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
#backends: [ V8, JavaScriptCore, QuickJs, Lua ]
backends: [ V8, JavaScriptCore ]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
key: build-dependencies-macos
path: |
build/ScriptCoreTestLibs
build/googletest-src
- name: prepare lcov
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install lcov
- name: Configure cmake
env:
SCRIPTCORE_TEST_FORCE_UPDATE_DEPS: ON
run: |
mkdir -p build && cd build
cmake ../test \
-DSCRIPTCORE_BACKEND=${{ matrix.backends }} \
-DDEVOPS_ENABLE_COVERAGE=ON \
-DCMAKE_BUILD_TYPE=DEBUG
- name: Compile UnitTests
run: |
cd build
cmake --build . -j $(sysctl -n hw.ncpu) --target UnitTests
- name: Run UnitTests
run: |
cd build && ./UnitTests
- name: Generate Coverate Data
# https://clang.llvm.org/docs/SourceBasedCodeCoverage.html
run: |
cd build
lcov -c -d CMakeFiles/ -o all.info
lcov -e all.info -o coverage.info '*/ScriptCore/src/*' '*/ScriptCore/backend/*'
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: './build/coverage.info'
flag-name: "Backend-${{ matrix.backends }}"
parallel: true
coverage-finish:
timeout-minutes: 30
needs: coverage-mac-clang
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true