Fix/3478/reset camera global option broken #6856
Workflow file for this run
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
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: '20' | |
- 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: '20' | |
- 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: '20' | |
- 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: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- 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 }} | |