aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/copybara_build_and_test.yml
blob: 55a9953605328e74d70f24d4b35cd7bfa06af013 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Copybara tests

on:
  pull_request:
    branches: [ google ]

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

permissions:
  contents: read

jobs:
  copybara-tests:
    runs-on: ubuntu-22.04

    steps:
      - uses: actions/checkout@v4

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

      - uses: gradle/actions/setup-gradle@v3

      - name: Build
        run: |
          SKIP_ERRORPRONE=true SKIP_JAVADOC=true \
          ./gradlew assemble testClasses --parallel --stacktrace --no-watch-fs

      - name: Integration tests
        run: |
          # Only run integration tests on Copybara PRs
          (cd integration_tests && \
            SKIP_ERRORPRONE=true SKIP_JAVADOC=true \
            ../gradlew test --info --stacktrace --continue --parallel --no-watch-fs \
            -Drobolectric.alwaysIncludeVariantMarkersInTestName=true \
            -Drobolectric.enabledSdks=34 \
            -Dorg.gradle.workers.max=2 \
            -Drobolectric.usePreinstrumentedJars=false \
            -x :integration_tests:nativegraphics:test \
          )