Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 42 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CTest
name: Test and Lint

on:
push:
Expand All @@ -7,7 +7,7 @@ on:
branches: ["main", "dev"]

jobs:
build-and-test:
build:
runs-on: ubuntu-latest

steps:
Expand All @@ -23,5 +23,43 @@ jobs:
- name: Build
run: cmake --build build

- name: Run tests
run: ctest --test-dir build --output-on-failure
- uses: actions/upload-artifact@v4
with:
name: built
path: ./build


test:
needs: build
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v4
with:
name: built
path: ./build

- name: Make test binary executable
run: chmod +x build/bin/RandomizerTests

- name: run-tests
run: ctest --test-dir build --output-on-failure

lint:
needs: build
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- uses: actions/download-artifact@v4
with:
name: built
path: ./build

- name: Get clang-tidy
run: sudo apt-get update && sudo apt-get install -y cmake clang clang-tidy g++

- name: lint
run: ./run-clang-tidy.py -p build -source-filter '^(?!.*_deps/googletest-src/).*'