From cf2349add66113d1be1f96ba0d4ba0a670f67428 Mon Sep 17 00:00:00 2001 From: alexzurbonsen Date: Sat, 16 Nov 2024 23:33:01 +0100 Subject: [PATCH] chore(ci): add github workflow to execute unit tests and lint project Signed-off-by: alexzurbonsen --- .github/workflows/lint.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/test.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..dd47ea5 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,30 @@ +# SPDX-FileCopyrightText: 2024 Alexander zur Bonsen +# SPDX-License-Identifier: Apache-2.0 + +name: Lint +run-name: Lint if-webpage-plugins + +on: + push: + branches: + - main + pull_request: + types: [opened, reopened, synchronize] + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + cache: 'npm' + node-version: 22 + + - name: Install dependencies + run: npm install + + - name: Run unit tests + run: npm run lint diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..4a3ce6a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,30 @@ +# SPDX-FileCopyrightText: 2024 Alexander zur Bonsen +# SPDX-License-Identifier: Apache-2.0 + +name: Test +run-name: Unit tests of if-webpage-plugins + +on: + push: + branches: + - main + pull_request: + types: [opened, reopened, synchronize] + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + cache: 'npm' + node-version: 22 + + - name: Install dependencies + run: npm install + + - name: Run unit tests + run: npm test