From dd00b2b2cfd661b589394944d05bcd98d19879dc Mon Sep 17 00:00:00 2001 From: Eric-Butcher Date: Sun, 13 Jul 2025 14:06:13 -0400 Subject: [PATCH 1/2] Added lint step to the gh actinos and sperated build-and-test into build and test. --- .github/workflows/testing.yml | 42 +++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index fb0d976..05182bc 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -1,4 +1,4 @@ -name: CTest +name: Test and Lint on: push: @@ -7,7 +7,7 @@ on: branches: ["main", "dev"] jobs: - build-and-test: + build: runs-on: ubuntu-latest steps: @@ -23,5 +23,39 @@ jobs: - name: Build run: cmake --build build - - name: Run tests - run: ctest --test-dir build --output-on-failure \ No newline at end of file + - 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: 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/).*' From d2ac6dc83c60b35f7e7cd5f8bb78a6096e40a8be Mon Sep 17 00:00:00 2001 From: Eric-Butcher Date: Sun, 13 Jul 2025 14:16:56 -0400 Subject: [PATCH 2/2] Made the etst bianry executable. --- .github/workflows/testing.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 05182bc..098bcc7 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -38,6 +38,10 @@ jobs: 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