Skip to content

feat: subject collection score and comment #850

feat: subject collection score and comment

feat: subject collection score and comment #850

# This is a basic workflow to help you get started with Actions
name: Server CI
# Controls when the workflow will run
on:
push:
branches:
- main
paths:
- "**"
- '!console/**'
- "!**.md"
pull_request:
branches:
- main
- release-*
paths:
- "**"
- '!console/**'
- "!**.md"
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
cache: 'gradle'
java-version: 17
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Check code style
run: ./gradlew check -x test
- name: Upload build dir if current step run failed.
uses: actions/[email protected]
if: ${{ failure() }}
with:
# Artifact name
name: checkBuild
# A file, directory or wildcard pattern that describes what to upload
path: /home/runner/work/ikaros/ikaros/server/build
# The desired behavior if no files are found using the provided path.
if-no-files-found: warn
# Duration after which artifact will expire in days. 0 means using default retention.Minimum 1 day. Maximum 90 days unless changed from the repository settings page.
retention-days: 7
checkConsole:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
cache: 'gradle'
java-version: 17
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Build console with npm
run: |
./gradlew buildFrontend -x test
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
cache: 'gradle'
java-version: 17
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Run tests
run: ./gradlew test
- name: Generate jacoco unit test coverage report xml
run: ./gradlew jacocoTestReport
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./server/build/reports/jacoco/test/jacocoTestReport.xml
- name: Upload build dir if current step run failed.
uses: actions/[email protected]
if: ${{ failure() }}
with:
# Artifact name
name: testBuild
# A file, directory or wildcard pattern that describes what to upload
path: /home/runner/work/ikaros/ikaros/server/build
# The desired behavior if no files are found using the provided path.
if-no-files-found: warn
# Duration after which artifact will expire in days. 0 means using default retention.Minimum 1 day. Maximum 90 days unless changed from the repository settings page.
retention-days: 7