-
Notifications
You must be signed in to change notification settings - Fork 26
52 lines (50 loc) · 1.32 KB
/
tests.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
name: Run tests
run-name: Run tests
on:
push:
branches:
- main
pull_request:
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: BATS tests
run: ./test/bats/bin/bats test
- name: E2E tests
run: |
for test_script in test/e2e/test_e2e_load_library*; do
echo "Running $test_script"
bash -x $test_script || exit 1
done
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
check_together: 'yes'
scandir: './src'
# https://github.com/bats-core/bats-core/blob/360c1ea5371622132ab669e9cb9687d21298699b/.github/workflows/tests.yml
coverage:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: ./test/generate_coverage.sh
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: coverage/*
- name: Print the Total Coverage
id: coverage-percent
shell: bash
env:
minimum_coverage: 90.01
run: test/check_coverage.sh