How to deploy GitHub Action for my KMM project

Viewed 193

Currently, I got some problems when I try to write the YAML file for deploying the GitHub action for KMM project. I don't know how to write the correct script (gradlew command) about testing the code of the shared module. Here's a part of my YAML file:

test_job:
    name: Test
    runs-on: ubuntu-latest
    continue-on-error: true
    steps:

      - name: Checkout
        uses: actions/checkout@v2

      - name: Set up JDK 11
        uses: actions/setup-java@v2
        with:
          java-version: '11'
          distribution: 'adopt'

      - name: Validate Gradle wrapper
        uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b

      - name: Restore Cache
        uses: actions/cache@v2
        with:
          path: |
            ~/.gradle/caches
            ~/.gradle/wrapper
          key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
          restore-keys: |
            ${{ runner.os }}-gradle-

      - name: Make gradle executable
        run: chmod +x ./gradlew

      - name: Run Debug Tests
        run: ./gradlew testDebugUnitTest --continue

      - name: Upload Test Reports
        if: ${{ always() }}
        uses: actions/upload-artifact@v2
        with:
          name: test-reports
          path: '**/build/reports/tests/'
1 Answers
Related