Skip to content

Keploy setup for running tests in ci #12

Keploy setup for running tests in ci

Keploy setup for running tests in ci #12

Workflow file for this run

name: Node Express GraphQL Template CI
on:
pull_request_target:
branches:
- develop
push:
branches:
- develop
jobs:
build_and_test:
name: Build & Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup environment
uses: actions/setup-node@v2
with:
cache: 'yarn'
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install
- name: Lint
run: yarn lint
- name: Test
run: yarn test
- name: Build
run: yarn build:local
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
with:
args: >
-Dsonar.scm.revision=${{ github.event.pull_request.head.sha }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
- uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
- uses: artiomtr/jest-coverage-report-action@v2.0-rc.4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
package-manager: yarn
threshold: ${{steps.threshold.outputs.prop}}
skip-step: all
annotations: failed-tests
- uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
files: ./reports/test-report.xml