OD-18050 feat: check if waiting list for this student and course is a… #6512
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: API test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
api-tests: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
java: [11] | |
steps: | |
- uses: ankane/setup-mariadb@v1 | |
with: | |
mariadb-version: "10.11" | |
database: angel_api_test | |
- uses: actions/checkout@v2 | |
- id: skip_check | |
uses: fkirc/[email protected] | |
with: | |
cancel_others: 'true' | |
skip_after_successful_duplicate: 'true' | |
paths_ignore: '["client-html/**", "api-doc/**"]' | |
- name: Setup timezone | |
uses: zcong1993/[email protected] | |
with: | |
timezone: "Australia/Sydney" | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.java }} | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
**/node_modules | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ matrix.java }}-node-${{ hashFiles('**/yarn.lock') }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: ${{ matrix.java }}- | |
- name: Run tests | |
if: ${{ steps.skip_check.outputs.should_skip != 'true' }} | |
run: ./gradlew api-test:test -x client-html:test -PdbUrl=jdbc:mariadb://localhost:3306/angel_api_test?user=root | |
# - name: Build coverage report | |
# if: ${{ steps.skip_check.outputs.should_skip != 'true' }} | |
# run: ./gradlew api-test:jacocoTestReport server:jacocoTestReport | |
- name: Publish test results | |
uses: EnricoMi/publish-unit-test-result-action@v1 | |
if: ${{ steps.skip_check.outputs.should_skip != 'true' }} | |
with: | |
files: '**/test-results/**/*.xml' | |
# - name: Upload coverage to Codecov | |
# if: ${{ steps.skip_check.outputs.should_skip != 'true' }} | |
# uses: codecov/codecov-action@v1 | |
# with: | |
# token: ${{ secrets.CODECOV_TOKEN }} | |
# flags: api | |
# files: server/build/reports/jacoco/test/jacocoTestReport.xml,api-test/build/reports/jacoco/test/jacocoTestReport.xml | |
# | |
# - name: Upload coverage to codeclimate | |
# uses: paambaati/[email protected] | |
# env: | |
# CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} | |
# with: | |
# workingDirectory: '${{github.workspace}}/server/src/main/java' | |
# coverageLocations: '${{github.workspace}}/**/build/reports/jacoco/test/jacocoTestReport.xml:jacoco' |