remove docs and readme job from release workflow #5982
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
on: | |
- push | |
- workflow_dispatch | |
- pull_request | |
name: CI | |
jobs: | |
integrationTest: | |
name: Integration tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '8' | |
- name: Retrieve branch name | |
id: branch_name | |
run: | | |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/} | |
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/} | |
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/} | |
- name: Fix code style | |
if: github.event_name == 'push' && github.ref != 'refs/heads/main' | |
run: ./gradlew spotlessApply | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
if: github.event_name == 'push' && github.ref != 'refs/heads/main' | |
with: | |
commit_message: "spotless: Fix code style" | |
commit_user_name: automation-commercetools | |
commit_user_email: [email protected] | |
commit_author: Auto Mation <[email protected]> | |
- name: License check | |
run: ./gradlew checkLicense | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
if: github.event_name == 'push' | |
with: | |
file_pattern: 'licenses/index.json licenses/**/index.json' | |
commit_message: "TASK: Updating license information" | |
commit_user_name: automation-commercetools | |
commit_user_email: [email protected] | |
commit_author: Auto Mation <[email protected]> | |
disable_globbing: true | |
- name: Run integration tests for PR | |
if: github.event_name == 'pull_request' | |
run: ./gradlew clean build runMainMethodThreadLeakTest | |
env: | |
CTP_CLIENT_ID: ${{ secrets.CTP_CLIENT_ID_PR }} | |
CTP_CLIENT_SECRET: ${{ secrets.CTP_CLIENT_SECRET_PR }} | |
CTP_PROJECT_KEY: ${{ secrets.CTP_PROJECT_KEY_PR }} | |
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }} | |
CTP_JVM_SDK_LOG_LEVEL: OFF | |
- name: Run integration tests | |
if: github.event_name != 'pull_request' | |
run: ./gradlew clean build runMainMethodThreadLeakTest | |
env: | |
CTP_CLIENT_ID: ${{ secrets.CTP_CLIENT_ID }} | |
CTP_CLIENT_SECRET: ${{ secrets.CTP_CLIENT_SECRET }} | |
CTP_PROJECT_KEY: ${{ secrets.CTP_PROJECT_KEY }} | |
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }} | |
CTP_JVM_SDK_LOG_LEVEL: OFF | |
- name: Test examples | |
run: | | |
./gradlew publishMavenPublicationToMavenLocal | |
cd examples/maven-okhttp3 && mvn verify --no-transfer-progress | |
cd ../maven-okhttp4 && mvn verify --no-transfer-progress | |
- name: Collect code coverage | |
run: ./gradlew codeCoverageReport | |
- name: Send code coverage report to Codecov.io | |
run: bash <(curl -s https://codecov.io/bash) || true | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |