Skip to content

Merge pull request #1179 from bcgov/feature/click-gateway-item #527

Merge pull request #1179 from bcgov/feature/click-gateway-item

Merge pull request #1179 from bcgov/feature/click-gateway-item #527

name: Sonar Scanner
on:
push:
branches: [dev, feature/*]
env:
REGISTRY: ghcr.io
REGISTRY_USERNAME: ${{ secrets.CONTAINER_REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }}
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Run Tests
run: |
docker compose up keycloak -d
set -o allexport
source ./.env.local
LOG_LEVEL=debug
KNEX_HOST=kong-db.localtest.me
NEXT_PUBLIC_MOCKS=off
set +o allexport
cd src
npm i
npm run intg-build
npm test
cd ..
docker compose down
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
with:
args: >
-Dsonar.organization=bcgov-oss
-Dsonar.projectKey=aps-portal
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.sources=src/auth,src/authz,src/batch,src/services
-Dsonar.javascript.lcov.reportPaths=./src/__coverage__/lcov.info
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}