Run tests #530
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |