Skip to content

Merge pull request #52 from pagarme/fix/due-factor-barcode #30

Merge pull request #52 from pagarme/fix/due-factor-barcode

Merge pull request #52 from pagarme/fix/due-factor-barcode #30

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
linter:
name: Linter
runs-on: ubuntu-latest
cancel-timeout-minutes: 2
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Node.js Setup
uses: actions/setup-node@v1
- name: Installation of Node.js dependencies
run: npm install
- name: Lint
run: npm run lint
tests:
name: Tests
runs-on: ubuntu-latest
cancel-timeout-minutes: 2
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Node.js Setup
uses: actions/setup-node@v1
- name: Installation of Node.js dependencies
run: npm install
- name: Tests
run: npm test
- name: Generate Coverage
run: npm run cover-report
env:
TZ: America/Sao_Paulo
- name: Archive code coverage results
uses: actions/upload-artifact@v2
with:
name: code-coverage-report
path: coverage/lcov.info
sonarcloud:
name: SonarCloud
needs: [linter, tests]
runs-on: ubuntu-latest
cancel-timeout-minutes: 2
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download a single artifact
uses: actions/download-artifact@v2
with:
name: code-coverage-report
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}