Skip to content

Commit

Permalink
uncomment tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fzhao99 committed Jan 10, 2024
1 parent 0054727 commit f5934a4
Show file tree
Hide file tree
Showing 2 changed files with 216 additions and 216 deletions.
372 changes: 186 additions & 186 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,189 +32,189 @@ defaults:
working-directory: backend

jobs:
# backend-tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up JDK ${{ env.JAVA_VERSION }}
# uses: actions/setup-java@v4
# with:
# java-version: ${{ env.JAVA_VERSION }}
# distribution: ${{ env.JAVA_DISTRIBUTION }}
# - name: Cache Java Dependencies
# uses: actions/[email protected]
# with:
# path: |
# ~/.gradle/caches
# ~/.gradle/wrapper
# key: gradle-${{ hashFiles('*.gradle', 'gradle/dependency-locks/*') }}
# - name: Start DB
# env:
# DOCKER_DATABASE_IMAGE_VERSION: ${{ inputs.DOCKER_DATABASE_IMAGE_VERSION }}
# run: touch ../.env && docker compose -f ../docker-compose.yml up -d db
# - name: Run tests
# env:
# OKTA_TESTING_DISABLEHTTPS: true
# TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
# TWILIO_AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }}
# run: ./gradlew jacocoTestReport -PtestDbPort=5432
# - name: Cache backend coverage results
# uses: actions/[email protected]
# with:
# path: backend/build/**
# key: ${{ runner.os }}-backend-coverage-${{ github.run_id }}-${{ github.run_attempt }}
# - name: Archive failed test results
# uses: actions/upload-artifact@v4
# if: failure()
# with:
# name: backend-test-report
# path: backend/build/reports/tests/test
# retention-days: 7
# frontend-tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Use Node.js ${{ env.NODE_VERSION }}
# uses: actions/[email protected]
# with:
# node-version: ${{ env.NODE_VERSION }}
# - name: Cache yarn
# uses: actions/[email protected]
# with:
# path: ~/.cache/yarn
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
# - name: Node setup
# working-directory: ./frontend
# run: yarn install --prefer-offline
# - name: Run tests
# working-directory: ./frontend
# run: yarn test:ci
# - name: Cache frontend coverage results
# uses: actions/[email protected]
# with:
# path: |
# frontend/coverage/**
# key: ${{ runner.os }}-frontend-coverage-${{ github.run_id }}-${{ github.run_attempt }}
# function-tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: "Function Apps: yarn install"
# working-directory: ./ops/services/app_functions/report_stream_batched_publisher/functions
# run: yarn
# - name: "Function Apps: Test"
# working-directory: ./ops/services/app_functions/report_stream_batched_publisher/functions
# run: yarn coverage
# - name: Cache function coverage results
# uses: actions/[email protected]
# with:
# path: |
# ops/services/app_functions/report_stream_batched_publisher/functions/coverage/**
# key: ${{ runner.os }}-function-coverage-${{ github.run_id }}-${{ github.run_attempt }}
# - name: Archive function coverage results
# uses: actions/upload-artifact@v4
# with:
# name: function-coverage
# path: ops/services/app_functions/report_stream_batched_publisher/functions/coverage
# sonar:
# needs: [ backend-tests, frontend-tests, function-tests ]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# if: ${{ github.actor != 'dependabot[bot]' }}
# with:
# fetch-depth: 0 # Disable shallow clones so Sonar can have all the data
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
# - name: Restore backend cache
# if: ${{ github.actor != 'dependabot[bot]' }}
# uses: actions/[email protected]
# with:
# path: |
# backend/build/**
# key: ${{ runner.os }}-backend-coverage-${{ github.run_id }}-${{ github.run_attempt }}
# - name: Restore frontend cache
# if: ${{ github.actor != 'dependabot[bot]' }}
# uses: actions/[email protected]
# with:
# path: |
# frontend/coverage/**
# key: ${{ runner.os }}-frontend-coverage-${{ github.run_id }}-${{ github.run_attempt }}
# - name: Restore functions cache
# if: ${{ github.actor != 'dependabot[bot]' }}
# uses: actions/[email protected]
# with:
# path: |
# ops/services/app_functions/report_stream_batched_publisher/functions/coverage/**
# key: ${{ runner.os }}-function-coverage-${{ github.run_id }}-${{ github.run_attempt }}
# - name: Set up JDK
# uses: actions/setup-java@v4
# with:
# java-version: ${{ env.JAVA_VERSION }}
# distribution: ${{ env.JAVA_DISTRIBUTION }}
# - name: Sonar analysis
# if: ${{ github.actor != 'dependabot[bot]' }}
# run: ./gradlew sonarqube -Dsonar.projectBaseDir=${{ env.PROJECT_ROOT }} --info
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# build-jar:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up JDK ${{ env.JAVA_VERSION }}
# uses: actions/setup-java@v4
# with:
# java-version: ${{ env.JAVA_VERSION }}
# distribution: ${{ env.JAVA_DISTRIBUTION }}
# - name: Cache Java dependencies
# uses: actions/[email protected]
# with:
# path: |
# ~/.gradle/caches
# ~/.gradle/wrapper
# key: gradle-${{ hashFiles('*.gradle', 'gradle/dependency-locks/*') }}
# - name: Run Java build
# run: ./gradlew assemble
# backend-lint:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up JDK ${{ env.JAVA_VERSION }}
# uses: actions/setup-java@v4
# with:
# java-version: ${{ env.JAVA_VERSION }}
# distribution: ${{ env.JAVA_DISTRIBUTION }}
# - name: Cache Java dependencies
# uses: actions/[email protected]
# with:
# path: |
# ~/.gradle/caches
# ~/.gradle/wrapper
# key: gradle-${{ hashFiles('*.gradle', 'gradle/dependency-locks/*') }}
# - name: Run style checks
# run: ./gradlew checkstyleMain checkstyleTest spotlessCheck --continue
# frontend-lint-and-build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Use Node.js ${{ env.NODE_VERSION }}
# uses: actions/[email protected]
# with:
# node-version: ${{ env.NODE_VERSION }}
# - name: Cache yarn
# uses: actions/[email protected]
# with:
# path: ~/.cache/yarn
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-yarn-
# - name: Node setup
# working-directory: ./frontend
# run: yarn
# - name: Lint front-end
# working-directory: ./frontend
# run: yarn lint
# - name: Build release
# working-directory: ./frontend
# run: yarn build
# backend-tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up JDK ${{ env.JAVA_VERSION }}
# uses: actions/setup-java@v4
# with:
# java-version: ${{ env.JAVA_VERSION }}
# distribution: ${{ env.JAVA_DISTRIBUTION }}
# - name: Cache Java Dependencies
# uses: actions/[email protected]
# with:
# path: |
# ~/.gradle/caches
# ~/.gradle/wrapper
# key: gradle-${{ hashFiles('*.gradle', 'gradle/dependency-locks/*') }}
# - name: Start DB
# env:
# DOCKER_DATABASE_IMAGE_VERSION: ${{ inputs.DOCKER_DATABASE_IMAGE_VERSION }}
# run: touch ../.env && docker compose -f ../docker-compose.yml up -d db
# - name: Run tests
# env:
# OKTA_TESTING_DISABLEHTTPS: true
# TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
# TWILIO_AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }}
# run: ./gradlew jacocoTestReport -PtestDbPort=5432
# - name: Cache backend coverage results
# uses: actions/[email protected]
# with:
# path: backend/build/**
# key: ${{ runner.os }}-backend-coverage-${{ github.run_id }}-${{ github.run_attempt }}
# - name: Archive failed test results
# uses: actions/upload-artifact@v4
# if: failure()
# with:
# name: backend-test-report
# path: backend/build/reports/tests/test
# retention-days: 7
# frontend-tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Use Node.js ${{ env.NODE_VERSION }}
# uses: actions/[email protected]
# with:
# node-version: ${{ env.NODE_VERSION }}
# - name: Cache yarn
# uses: actions/[email protected]
# with:
# path: ~/.cache/yarn
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
# - name: Node setup
# working-directory: ./frontend
# run: yarn install --prefer-offline
# - name: Run tests
# working-directory: ./frontend
# run: yarn test:ci
# - name: Cache frontend coverage results
# uses: actions/[email protected]
# with:
# path: |
# frontend/coverage/**
# key: ${{ runner.os }}-frontend-coverage-${{ github.run_id }}-${{ github.run_attempt }}
# function-tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: "Function Apps: yarn install"
# working-directory: ./ops/services/app_functions/report_stream_batched_publisher/functions
# run: yarn
# - name: "Function Apps: Test"
# working-directory: ./ops/services/app_functions/report_stream_batched_publisher/functions
# run: yarn coverage
# - name: Cache function coverage results
# uses: actions/[email protected]
# with:
# path: |
# ops/services/app_functions/report_stream_batched_publisher/functions/coverage/**
# key: ${{ runner.os }}-function-coverage-${{ github.run_id }}-${{ github.run_attempt }}
# - name: Archive function coverage results
# uses: actions/upload-artifact@v4
# with:
# name: function-coverage
# path: ops/services/app_functions/report_stream_batched_publisher/functions/coverage
# sonar:
# needs: [ backend-tests, frontend-tests, function-tests ]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# if: ${{ github.actor != 'dependabot[bot]' }}
# with:
# fetch-depth: 0 # Disable shallow clones so Sonar can have all the data
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
# - name: Restore backend cache
# if: ${{ github.actor != 'dependabot[bot]' }}
# uses: actions/[email protected]
# with:
# path: |
# backend/build/**
# key: ${{ runner.os }}-backend-coverage-${{ github.run_id }}-${{ github.run_attempt }}
# - name: Restore frontend cache
# if: ${{ github.actor != 'dependabot[bot]' }}
# uses: actions/[email protected]
# with:
# path: |
# frontend/coverage/**
# key: ${{ runner.os }}-frontend-coverage-${{ github.run_id }}-${{ github.run_attempt }}
# - name: Restore functions cache
# if: ${{ github.actor != 'dependabot[bot]' }}
# uses: actions/[email protected]
# with:
# path: |
# ops/services/app_functions/report_stream_batched_publisher/functions/coverage/**
# key: ${{ runner.os }}-function-coverage-${{ github.run_id }}-${{ github.run_attempt }}
# - name: Set up JDK
# uses: actions/setup-java@v4
# with:
# java-version: ${{ env.JAVA_VERSION }}
# distribution: ${{ env.JAVA_DISTRIBUTION }}
# - name: Sonar analysis
# if: ${{ github.actor != 'dependabot[bot]' }}
# run: ./gradlew sonarqube -Dsonar.projectBaseDir=${{ env.PROJECT_ROOT }} --info
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-jar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Cache Java dependencies
uses: actions/[email protected]
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ hashFiles('*.gradle', 'gradle/dependency-locks/*') }}
- name: Run Java build
run: ./gradlew assemble
backend-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Cache Java dependencies
uses: actions/[email protected]
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ hashFiles('*.gradle', 'gradle/dependency-locks/*') }}
- name: Run style checks
run: ./gradlew checkstyleMain checkstyleTest spotlessCheck --continue
frontend-lint-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/[email protected]
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache yarn
uses: actions/[email protected]
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Node setup
working-directory: ./frontend
run: yarn
- name: Lint front-end
working-directory: ./frontend
run: yarn lint
- name: Build release
working-directory: ./frontend
run: yarn build
Loading

0 comments on commit f5934a4

Please sign in to comment.