autonomouslogic/dynamo-mapper

View on GitHub
.github/workflows/build.yml

Summary

Maintainability
Test Coverage
name: Test
on: [ push ]
jobs:
  Test:
    timeout-minutes: 30
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Setup Java
        uses: actions/setup-java@v4
        with:
          distribution: adopt
          java-version: 11

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

      - name: Test
        run: ./gradlew test --stacktrace

      - name: Integration Test
        env:
          AWS_REGION: ${{ secrets.AWS_REGION }}
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
        run: ./gradlew integrationTest --stacktrace

      - name: Code Coverage
        run: ./gradlew jacocoTestReport --stacktrace

      - name: Codecov Upload
        uses: codecov/codecov-action@v4
        with:
          verbose: true
          token: ${{ secrets.CODECOV_TOKEN }}