added parsing for empty personality type tokens #255
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: CI Tests | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Debug | |
jobs: | |
ci_test_coverage: | |
runs-on: ubuntu-latest | |
container: ghcr.io/shitwolfymakes/esmb-ci:v1.2.6 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run CMake | |
run: CXX="g++ --coverage -fprofile-arcs -ftest-coverage" cmake -S . -B build_coverage -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
run: cmake --build build_coverage --config ${{env.BUILD_TYPE}} | |
- name: Run Tests | |
working-directory: ./build_coverage/tests | |
run: for f in ./*_tests; do ./$f; done | |
- run: find . -type f -name "*.gc*" | |
# useful notes: https://qiaomuf.wordpress.com/2011/05/26/use-gcov-and-lcov-to-know-your-test-coverage/ | |
- run: | | |
# collect paths of all coverage data files | |
PATHS=$(find . -type f -path "*build_coverage/_deps/**/*.gc*") | |
# build a string with all of the files and concatenate each to a separate `--exclude` flag | |
EXCLUSIONS=$( | |
for PATH in $PATHS; do | |
echo -n " --exclude \"$PATH\"" | |
done | |
) | |
lcov --no-external --base-directory . --directory ./build_coverage/src --capture --output-file coverage.info | |
# remove dependency headers from coverage before running genhtml | |
- run: lcov --remove coverage.info "*build_coverage/_deps*" --output-file coverage.info | |
- run: genhtml --title "Endless Sky Mission Builder" coverage.info --output-directory lcov_out | |
- run: ls -al . ./build_coverage ./lcov_out | |
- name: Archive coverage report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: code-coverage-report | |
path: ./lcov_out | |
- name: Publish report to Coveralls | |
uses: coverallsapp/github-action@1.1.3 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: ./coverage.info |