Fix duplicate network call for chunked responses #4996
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
CACHE_VERSION: 1 # Increment this to invalidate the cache. | |
CI: true | |
JAVA_VERSION: 20 | |
jobs: | |
checks: | |
name: Checks | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ env.JAVA_VERSION }} | |
- run: ./ci_clear_gradle_cache.sh | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties', '**/libs.versions.toml') }} | |
- name: Check Gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Check style | |
run: ./gradlew spotlessCheck | |
- name: Check lint | |
run: ./gradlew lint | |
- name: Check binary compatibility | |
run: ./gradlew apiCheck || { exit_code=$?; printf "*** This PR changes Coil's public API. If this change is intentional, run './gradlew apiDump' and commit the new API files. ***"; exit $exit_code; } | |
- name: Check assemble | |
run: ./gradlew assembleDebug | |
unit-tests: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ env.JAVA_VERSION }} | |
- run: ./ci_clear_gradle_cache.sh | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties', '**/libs.versions.toml') }} | |
- name: Unit tests | |
run: ./gradlew testDebugUnitTest verifyPaparazziDebug verifyRoborazziDebug | |
instrumentation-tests: | |
name: Instrumentation tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
strategy: | |
fail-fast: true | |
matrix: | |
# API 21 is flaky and times out. | |
api-level: [22, 26, 31] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ env.JAVA_VERSION }} | |
- run: ./ci_clear_gradle_cache.sh | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties', '**/libs.versions.toml') }} | |
# API 30+ emulators only have x86_64 system images. | |
- name: Get AVD info | |
uses: ./.github/actions/get-avd-info | |
id: avd-info | |
with: | |
api-level: ${{ matrix.api-level }} | |
- name: Enable KVM | |
run: | | |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
sudo udevadm control --reload-rules | |
sudo udevadm trigger --name-match=kvm | |
- name: Instrumentation tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.api-level }} | |
arch: ${{ steps.avd-info.outputs.arch }} | |
target: ${{ steps.avd-info.outputs.target }} | |
script: mv .github/debug.keystore ~/.android; ./gradlew connectedDebugAndroidTest | |
deploy-snapshot: | |
name: Deploy snapshot | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
if: github.repository == 'coil-kt/coil' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.x') | |
needs: [checks, unit-tests, instrumentation-tests] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: Deploy Snapshot | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} | |
run: ./publish_remote.sh | |
deploy-docs: | |
name: Deploy docs | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
if: github.repository == 'coil-kt/coil' && github.ref == 'refs/heads/main' | |
needs: [checks, unit-tests, instrumentation-tests] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
lfs: 'true' | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ env.JAVA_VERSION }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Deploy Docs | |
run: | | |
git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com' | |
pip3 install --upgrade pip && pip3 install mkdocs-material mkdocs-material-extensions mkdocs-minify-plugin | |
./deploy_docs.sh |