Skip to content

Merge pull request #46 from vechain/dependabot/npm_and_yarn/ansi-rege… #82

Merge pull request #46 from vechain/dependabot/npm_and_yarn/ansi-rege…

Merge pull request #46 from vechain/dependabot/npm_and_yarn/ansi-rege… #82

Workflow file for this run

name: Unit Test
on:
push:
branches:
- master
pull_request:
jobs:
test:
runs-on: ubuntu-latest
name: Node ${{ matrix.node }}
strategy:
matrix:
node: [14,16,18, lts/*, latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Run tests
run: npm run cover
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ${{matrix.os}}-node-${{ matrix.node }}
parallel: true
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true