diff --git a/.github/workflows/api-test-module-workflow.yml b/.github/workflows/api-test-module-workflow.yml new file mode 100644 index 0000000..a11e342 --- /dev/null +++ b/.github/workflows/api-test-module-workflow.yml @@ -0,0 +1,33 @@ +name: Reusable workflow. Using test API module + +on: + workflow_call: + inputs: + MODULE_NAME: + description: "Using for choice specified module when test application." + required: true + type: string + secrets: + SECRET_GITHUB_TOKEN: + required: true + SECRET_GITHUB_USERNAME: + required: true + +jobs: + api-test-module-workflow: + runs-on: custom + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 17 + uses: actions/setup-java@v1 + with: + java-version: 17 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Test application with Gradle + run: ./gradlew test -p ${{ inputs.MODULE_NAME }} + env: + GITHUB_USERNAME: ${{ secrets.SECRET_GITHUB_USERNAME }} + GITHUB_TOKEN: ${{ secrets.SECRET_GITHUB_TOKEN }} \ No newline at end of file