From 42596f892040e4dc68d57f66f3dfc43ade0818e7 Mon Sep 17 00:00:00 2001 From: Dirk Ehrhardt Date: Fri, 9 Aug 2024 11:38:02 +0200 Subject: [PATCH] chore: add github workflow for lint, test and sonar --- .github/workflows/lint_test_sonar.yml | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/lint_test_sonar.yml diff --git a/.github/workflows/lint_test_sonar.yml b/.github/workflows/lint_test_sonar.yml new file mode 100644 index 0000000..dcfad0e --- /dev/null +++ b/.github/workflows/lint_test_sonar.yml @@ -0,0 +1,35 @@ +name: Quality Check (Lint, Test, Sonarcloud) +on: + push: + branches: + - main + pull_request: + branches: + - main + - develop + workflow_dispatch: + workflow_call: + +jobs: + test: + runs-on: ubuntu-22.04 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + cache: 'yarn' + - name: Install dependencies + run: yarn install --immutable + - name: Run Linting + run: yarn run lint + - name: Run Tests with Coverage + run: yarn run coverage + - name: Run SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}