Skip to content

Bug/3653/improve steetmap and treemapstreet layout #6607

Bug/3653/improve steetmap and treemapstreet layout

Bug/3653/improve steetmap and treemapstreet layout #6607

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
check_prettier:
if: "!contains(github.event.head_commit.message, 'Deploying to main')"
name: Prettier Test
runs-on: ubuntu-latest
env:
working-directory: ./
steps:
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Cache root node modules
uses: actions/cache@v3
env:
cache-name: cache-root-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Node
run: npm ci
working-directory: ${{env.working-directory}}
- name: Lint files
run: |
npm run format:check
working-directory: ${{env.working-directory}}
build_visualization_test:
if: "!contains(github.event.head_commit.message, 'Deploying to main')"
name: Visualization Test
runs-on: ubuntu-latest
env:
working-directory: ./visualization
steps:
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Node
run: npm ci
working-directory: ${{env.working-directory}}
- name: Test and Linter
env:
NODE_OPTIONS: "--max_old_space_size=4096"
run: |
npm run test
npm run lint
working-directory: ${{env.working-directory}}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: coverage
path: ./visualization/dist/
build_visualization_e2e:
if: "!contains(github.event.head_commit.message, 'Deploying to main')"
name: Visualization E2E
runs-on: ubuntu-latest
env:
working-directory: ./visualization
steps:
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Node
run: npm ci
working-directory: ${{env.working-directory}}
- name: Test and Linter
run: |
npm run build
npm run e2e:ci
working-directory: ${{env.working-directory}}
test_and_sonar_analysis:
name: "Build, Test and Publish Analysis Sonar Results"
runs-on: ubuntu-latest
env:
working-directory: ./analysis
project-directory: .
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build
run: |
chmod +x ./gradlew
./gradlew build
working-directory: ${{env.working-directory}}
- name: Test Analysis
run: |
./gradlew integrationTest
./gradlew jacocoTestReport
working-directory: ${{env.working-directory}}
- name: Docker Test Analysis
run: |
user_instance="docker_runner"
docker build ./analysis -t local-ccsh --build-arg USER_ADD=true --build-arg USER_ID=1001 --build-arg USERNAME=${user_instance} --no-cache
current_version=$(node -pe "require('./analysis/node-wrapper/package.json').version")
docker run -w /home/${user_instance}/cc/analysis/test -v $(pwd):/home/${user_instance}/cc local-ccsh bash ./golden_test.sh ${current_version} /home/${user_instance}/tmp-files/ /usr/local/bin/ccsh
docker build ./analysis -t local-ccsh --no-cache
working-directory: ${{env.project-directory}}
- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: 17
- name: SonarCloud Scan Gradle
run: |
./gradlew sonar
working-directory: ${{env.working-directory}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
JAVA_HOME: ${{ env.JAVA_HOME }}
publish_sonar_visualization:
needs: [build_visualization_test, build_visualization_e2e]
name: "Build and Publish Visualization Sonar Results"
runs-on: ubuntu-latest
env:
working-directory: ./visualization
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
with:
name: coverage
path: ./visualization/dist/
- name: SonarCloud Scan
uses: SonarSource/[email protected]
with:
projectBaseDir: ./visualization
args: >
-Dsonar.javascript.lcov.reportPaths=./dist/coverage/lcov.info
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}