tests: Added automatic pattern tests

This commit is contained in:
WerWolv
2022-06-23 12:01:10 +02:00
parent 68edebbe4f
commit 7d122d9d74
9 changed files with 192 additions and 1 deletions

51
.github/workflows/tests.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
name: "Unit Tests"
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
tests:
name: 🧪 Unit Tests
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: 🧰 Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: ⬇️ Install dependencies
run: |
sudo apt update
sudo apt install -y \
build-essential \
gcc-11 \
g++-11 \
lld \
${PKGCONF:-} \
cmake \
make \
- name: 🛠️ Build
run: |
mkdir -p build
cd build
CC=gcc-11 CXX=g++-11 cmake \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
-DLIBPL_ENABLE_TESTS=OFF \
..
make -j4
- name: 🧪 Perform Unit Tests
run: |
cd build
ctest