This repository has been archived by the owner on Sep 4, 2024. It is now read-only.
Feat: Now only the Datapoints that are shown in table are displayed i… #1366
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Node.js CI | |
on: [push, pull_request] | |
jobs: | |
install-build-test: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./frontend | |
strategy: | |
matrix: | |
node-version: [14.x, 16.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: npm install | |
- name: Build dependencies | |
run: npm run build | |
# TODO: When tests are ready | |
# - name: Test & create coverage | |
# run: yarn test:ci | |
# - name: Upload Sonar Test Results Frontend | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: sonar-report-frontend | |
# path: ${{ github.workspace }}/frontend/sonar-report.xml | |
# - name: Upload Sonar Test Coverage Frontend | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: sonar-coverage-frontend | |
# path: ${{ github.workspace }}/frontend/coverage/lcov.info | |
sonarqube: | |
needs: install-build-test | |
name: SonarQube Scan | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
# Disabling shallow clone is recommended for improving relevancy of reporting | |
fetch-depth: 0 | |
# - name: Download Sonar Test Results Frontend | |
# uses: actions/download-artifact@v2 | |
# with: | |
# name: sonar-report-frontend | |
# path: ${{ github.workspace }}/frontend | |
# - name: Download Sonar Test Coverage Frontend | |
# uses: actions/download-artifact@v2 | |
# with: | |
# name: sonar-coverage-frontend | |
# path: ${{ github.workspace }}/frontend/coverage | |
# - name: fix code coverage paths | |
# working-directory: ./frontend | |
# run: | | |
# sed -i 's/\/home\/runner\/work\/ddueruem-web\/ddueruem-web\//\/github\/workspace\//g' coverage/lcov.info | |
# sed -i 's/\/home\/runner\/work\/ddueruem-web\/ddueruem-web\//\/github\/workspace\//g' sonar-report.xml | |
- name: Set Sonarqube Project Name | |
run: | | |
sed -ir "s/^[#]*\s*sonar\.projectKey=.*/sonar\.projectKey=ddueruem\-web\-frontend\-$(echo "${{ github.ref_name }}" | sed -r 's/[\/]+/_/g' | sed -r 's/[-]+/\\\-/g')/" ${{ github.workspace }}/frontend/sonar-project.properties | |
- name: SonarQube Scan | |
uses: sonarsource/sonarqube-scan-action@master | |
with: | |
projectBaseDir: "./frontend" | |
env: | |
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} | |
SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }} |