Add test workflow

This commit is contained in:
2022-05-04 19:47:14 +03:00
parent e1bd21d8e0
commit 1fbe15e208

View File

@@ -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 }}