From 8412bfee861cd4df34b0296c8b94855e19195544 Mon Sep 17 00:00:00 2001 From: CookieDasora Date: Sat, 30 Sep 2023 18:33:16 -0300 Subject: [PATCH] ci(commitlint,workflow): added GitHub action workflow to run commitlint and tests on push and pr --- .github/workflows/commitlint.yml | 11 +++++++++++ .github/workflows/run-tests.yml | 21 +++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/commitlint.yml create mode 100644 .github/workflows/run-tests.yml diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml new file mode 100644 index 0000000..dcb06c4 --- /dev/null +++ b/.github/workflows/commitlint.yml @@ -0,0 +1,11 @@ +name: Lint Commit Messages +on: [pull_request, push] + +jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: wagoid/commitlint-github-action@v4 diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..ba12682 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,21 @@ +name: Run Tests + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 18 + - run: npm ci + - run: npx vitest run