Fallback mitigation (#68) #258
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: "Backend tests" | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: install dependencies | |
run: sudo apt install cmake sqlite3 | |
- name: setup gcc | |
uses: egor-tensin/setup-gcc@v1 | |
with: | |
version: latest | |
platform: x64 | |
- uses: actions/[email protected] | |
with: | |
submodules: recursive | |
- name: build | |
run: cmake -B .ccache && cmake --build .ccache | |
env: | |
CXX: g++-13 | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: setup env | |
run: sudo apt install cpplint | |
- name: | |
run: cpplint --filter='-legal/copyright,-whitespace/line_length,-build/namespaces,-build/c++11,-runtime/references' --recursive src include | |
naming: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/[email protected] | |
- uses: cachix/install-nix-action@v22 | |
with: | |
nix_path: nixpkgs=channel:nixos-23.11 | |
- name: build | |
run: nix build .#packages.x86_64-linux.ncc | |
- name: run test | |
run: ./result/bin/ncc --style files/style.yml --recurse --path include src | |
test-all: | |
needs: build | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/[email protected] | |
- uses: hendrikmuhs/[email protected] | |
with: | |
create-symlink: true | |
save: false | |
- name: setup-env | |
run: sudo apt install sqlite3 | |
- name: test-all | |
run: ctest --test-dir .ccache | |
valgrind: | |
needs: build | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/[email protected] | |
- uses: hendrikmuhs/[email protected] | |
with: | |
create-symlink: true | |
save: false | |
- name: setup-env | |
run: sudo apt install sqlite3 valgrind | |
- name: test-database-tests | |
run: valgrind ./.ccache/bin/database_test | |
- name: test-utils-tests | |
run: valgrind ./.ccache/bin/utils_test | |
- name: test-predictions-test | |
run: valgrind ./.ccache/bin/predictions_test | |
api-test: | |
needs: build | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/[email protected] | |
- uses: hendrikmuhs/[email protected] | |
with: | |
create-symlink: true | |
save: false | |
- name: setup-env | |
run: sudo apt install sqlite3 curl jq | |
- name: run-test | |
run: bash ./tests/api-test.sh .ccache |