From 109b244fd60dce444a82c8ba15c6e95185934bea Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Sun, 10 Mar 2024 19:39:21 +0200 Subject: [PATCH 1/3] chore(actions): add automated testing --- .github/workflows/test.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..e544b59 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,25 @@ +name: Tests +on: + push: + branches: + - main + pull_request: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup CMake + uses: jwlawson/actions-setup-cmake@v1.14 + - name: Setup Ninja + uses: seanmiddleditch/gha-setup-ninja@master + - name: Configure and build + run: | + cmake -G Ninja -B build + cd build + ninja + - name: Run tests + run: ./build/runtests From f689b3dda8677249cf6cef3b06490c40a1294663 Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Sun, 10 Mar 2024 19:41:53 +0200 Subject: [PATCH 2/3] docs(actions): add "Tests" badge --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c3a10e5..d116405 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Overview +![Tests](https://github.com/jorenchik/testing-spring-2024/actions/workflows/tests.yml/badge.svg) + ## Project This is a simple C++ project that includes the function for our colleagues to @@ -21,7 +23,7 @@ Compilation on Linux requires cmake and CXX compiler (e.g., g++). ### ninja ```bash -cmake -Gninja -Bbuild +cmake -G ninja -B build cd build ninja ./main @@ -30,7 +32,7 @@ ninja ### Make ```bash -cmake -Bbuild +cmake -B build cd build make ./main From 4ed7adf7418baef415d3cba941f1f8de11bef5ab Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Sun, 10 Mar 2024 20:19:29 +0200 Subject: [PATCH 3/3] docs(actions): fix badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d116405..621f621 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Overview -![Tests](https://github.com/jorenchik/testing-spring-2024/actions/workflows/tests.yml/badge.svg) +[![Tests](https://github.com/jorenchik/testing-spring-2024/actions/workflows/test.yml/badge.svg)](https://github.com/jorenchik/testing-spring-2024/actions/workflows/test.yml) ## Project