Skip to content

chore(ci): reduce client unit test for pydantic versions #7533

chore(ci): reduce client unit test for pydantic versions

chore(ci): reduce client unit test for pydantic versions #7533

name: Server Unit test Report
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: '${{ github.workflow }} @ ${{ github.ref }}'
cancel-in-progress: true
jobs:
filter:
runs-on: ubuntu-latest
outputs:
server: ${{ steps.filter.outputs.server }}
java: ${{ steps.filter.outputs.java }}
steps:
- uses: actions/checkout@v3
- name: Check for java files changed
uses: getsentry/paths-filter@v2
id: filter
with:
base: main
filters: .github/file-filter.yml
build:
runs-on: ubuntu-latest
needs:
- filter
if: ${{ (github.event_name == 'pull_request' && needs.filter.outputs.server == 'true') || github.event_name == 'push' }}
permissions:
contents: read
packages: write
steps:
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: "11"
distribution: "adopt"
cache: "maven"
server-id: starwhale # Value of the distributionManagement/repository/id field of the pom.xml
- name: Build with Maven
working-directory: ./server
env:
COVERALL_TOKEN: ${{ secrets.COVERALL_TOKEN }}
run: make ci-package-with-unit-test-report
- name: Upload test output on failure
if: failure()
uses: actions/upload-artifact@v3
with:
name: server-ut-logs
path: ./server/**/*sw-test-output/*.txt
retention-days: 2
- name: Publish coverage to codecov
uses: codecov/codecov-action@v3
with:
name: controller-ut
fail_ci_if_error: false
flags: controller
verbose: true
directory: ./server