From d292a8d0888ad2a8f2bc9c59b44cf5d98cf781a9 Mon Sep 17 00:00:00 2001 From: Jose Buitron Date: Wed, 17 Nov 2021 12:58:25 -0500 Subject: [PATCH] chore: Github workflow checks (#6) chore: Lint, test, build action chore: Commit message check action --- .github/workflows/build.yml | 64 ++++++++++++++++++++ .github/workflows/check-commits.yml | 20 ++++++ src/localization/localizationService.test.js | 2 - 3 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/check-commits.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..9f6d8ad9a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,64 @@ +name: build + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: '16' + + - name: Install dependencies + run: npm install + + - name: Run lint checks + run: npm run lint + + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: '16' + + - name: Install dependencies + run: npm install + + - name: Run test + run: npm run test + + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: '16' + + - name: Install dependencies + run: npm install + + - name: Run build + run: npm run build diff --git a/.github/workflows/check-commits.yml b/.github/workflows/check-commits.yml new file mode 100644 index 000000000..07229a0fd --- /dev/null +++ b/.github/workflows/check-commits.yml @@ -0,0 +1,20 @@ +name: check-commits + +on: + pull_request: + branches: + - main + types: + - opened + - edited + - synchronize + +jobs: + check-for-cc: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Check for Conventional Commits + uses: agenthunt/conventional-commit-checker-action@v1.0.0 diff --git a/src/localization/localizationService.test.js b/src/localization/localizationService.test.js index 3d66efb16..6d9c2197b 100644 --- a/src/localization/localizationService.test.js +++ b/src/localization/localizationService.test.js @@ -1,5 +1,3 @@ -import React from 'react' - import * as localizationService from './localizationService' test('Localization Service: check if rendered', () => {