SK-2436: improve unit test Coverage for java v3 sdk #621
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@v1 | |
| - uses: actions/setup-java@v1 | |
| with: | |
| java-version: "11" | |
| - 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 v3/.env | |
| echo SKYFLOW_CREDENTIALS=${{ secrets.SKYFLOW_CREDENTIALS }} >> v3/.env | |
| echo TEST_EXPIRED_TOKEN=${{ secrets.TEST_EXPIRED_TOKEN }} >> v3/.env | |
| echo TEST_REUSABLE_TOKEN=${{ secrets.TEST_REUSABLE_TOKEN }} >> v3/.env | |
| - name: Build & Run tests with Maven | |
| run: mvn -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn 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 |