-
Notifications
You must be signed in to change notification settings - Fork 828
58 lines (46 loc) · 2.07 KB
/
test.yml
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
name: test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions/setup-node@main
- name: configure-g++
run: |
sudo apt-get install g++-12
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
sudo update-alternatives --install /usr/bin/x86_64-linux-gnu-g++ x86_64-linux-gnu-g++ /usr/bin/x86_64-linux-gnu-g++-12 100
- name: configure-gcov
run: |
sudo apt-get install libcapture-tiny-perl libdatetime-perl
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/x86_64-linux-gnu-gcov-12 100
- name: configure-test
run: |
sudo apt-get install cowsay
sudo npm install -g npm-check-updates
- name: install
run: KUNITS=1 make install lib K <<< 1
- name: check
run: |
make check | tr -d "#" | cowsay -nW80 -fduck
(cd /var/lib/K && ncu) | sed '/^\s*$/d' | cowsay -nW80 -fduck
- name: test
run: |
make test-c | cowsay -nW160 -felephant || :
make test | sed '/^\s*$/d' | sed '/====/d' | cowsay -nW160 -fbud-frogs && test ${PIPESTATUS[0]} -eq 0
- name: coverage
run: |
lcov -o lcov.info -c -d . --gcov-tool /usr/bin/gcov > /dev/null 2>&1
lcov -o lcov.info -r lcov.info '/usr/*' '*/include/*' > /dev/null 2>&1
lcov -l lcov.info | cowsay -nW80 -fdefault
- uses: coverallsapp/github-action@main
continue-on-error: true
with:
path-to-lcov: lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: codacy/codacy-coverage-reporter-action@master
continue-on-error: true
with:
coverage-reports: lcov.info
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}