39 lines
953 B
YAML
39 lines
953 B
YAML
name: OTA Admin Portal v2 Test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- v2/trunk
|
|
pull_request:
|
|
|
|
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 }}
|