Files
ota-admin-portal/.github/workflows/test-v2.yml
2023-09-08 11:09:29 -07:00

41 lines
984 B
YAML

name: OTA Admin Portal v2 Test
on:
push:
branches:
- v2/trunk
pull_request:
branches:
- v2/trunk
jobs:
test:
runs-on: ubuntu-latest
env:
JFROG_NPMRC: ${{ secrets.JFROG_NPMRC }}
GH_TOKEN: Fisker-Inc:${{secrets.GITHUB_TOKEN}}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: "18.x"
cache: npm
- name: Run Tests
run: |
echo ${JFROG_NPMRC} | base64 -d > .npmrc
npm install
npm test -- --coverage --coverageDirectory='coverage' --watchAll=false --passWithNoTests #remove once tests are written
npm run build
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}