SK-2440: Add upload tests report to code cov step for java v3 sdk #614
This file contains hidden or 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: PR CI Checks | |
| on: | |
| pull_request: | |
| push: | |
| branches: [ "v3" ] | |
| jobs: | |
| check-commit-message: | |
| name: Check Commit Message | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check JIRA ID | |
| uses: gsactions/commit-message-checker@v1 | |
| with: | |
| pattern: '(\[?[A-Z]{1,5}-[1-9][0-9]*)|(\[AUTOMATED\])|(Merge)|(Release).+$' | |
| flags: "gm" | |
| excludeDescription: "true" | |
| checkAllCommitMessages: "true" | |
| accessToken: ${{ secrets.PAT_ACTIONS }} | |
| error: "One of your commit messages is not matching the format with JIRA ID Ex: ( SDK-123 commit message )" | |
| Test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-java@v3 | |
| with: | |
| java-version: "8" | |
| distribution: "temurin" | |
| cache: "maven" | |
| - name: create-json | |
| id: create-json | |
| uses: jsdaniell/create-json@1.1.2 | |
| with: | |
| name: "credentials.json" | |
| json: ${{ secrets.TEST_CREDENTIALS_FILE_STRING }} | |
| - name: create env | |
| id: create-env | |
| run: | | |
| touch .env | |
| echo SKYFLOW_CREDENTIALS=${{ secrets.SKYFLOW_CREDENTIALS }} >> .env | |
| echo TEST_EXPIRED_TOKEN=${{ secrets.TEST_EXPIRED_TOKEN }} >> .env | |
| echo TEST_REUSABLE_TOKEN=${{ secrets.TEST_REUSABLE_TOKEN }} >> .env | |
| - name: Build & Run tests with Maven | |
| run: mvn -B clean test jacoco:report -pl v3 -am -Dmaven.javadoc.skip=true | |
| - name: Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| token: ${{ secrets.CODECOV_REPO_UPLOAD_TOKEN }} | |
| files: v3/target/site/jacoco/jacoco.xml | |
| flags: unittests | |
| name: codecov-skyflow-java | |
| fail_ci_if_error: true | |
| verbose: true |