aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorDaniel Santiago <danysantiago@google.com>2021-01-27 16:36:18 -0800
committerDagger Team <dagger-dev+copybara@google.com>2021-01-27 16:38:04 -0800
commit229c99fe65bd3a373788727080b998ccd50ca2b8 (patch)
tree49c2881c735da1f7d5209b9981f85f68e7c5c527 /.github
parent98c73c619022942add6a6375da0ca6df9fa82aae (diff)
downloaddagger2-229c99fe65bd3a373788727080b998ccd50ca2b8.tar.gz
Exclude Dagger local snapshots from Maven local repo cache.
This prevents the LOCAL-SNAPSHOT artifacts from being cached with the rest of the `.m2/repository` directory which in turn would cause other jobs to fail due to not using the local snapshots built for the workflow. Instead use the upload and download actions to share the artifacts between jobs. RELNOTES=N/A PiperOrigin-RevId: 354200073
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml29
1 files changed, 16 insertions, 13 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 89e1ecf20..9814c5854 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,7 +16,9 @@ jobs:
- name: 'Cache local Maven repository'
uses: actions/cache@v2
with:
- path: ~/.m2/repository
+ path: |
+ ~/.m2/repository
+ !~/.m2/repository/com/google/dagger
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
@@ -26,6 +28,11 @@ jobs:
- name: 'Install local snapshot'
run: ./util/install-local-snapshot.sh
shell: bash
+ - name: 'Upload local snapshot for tests'
+ uses: actions/upload-artifact@v2
+ with:
+ name: local-snapshot
+ path: ~/.m2/repository/com/google/dagger
artifact-local-tests:
name: 'Artifact local tests'
needs: bazel-test
@@ -33,13 +40,11 @@ jobs:
steps:
- name: 'Check out repository'
uses: actions/checkout@v2
- - name: 'Cache local Maven repository'
- uses: actions/cache@v2
+ - name: 'Download local snapshot for tests'
+ uses: actions/download-artifact@v2
with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-maven-
+ name: local-snapshot
+ path: ~/.m2/repository/com/google/dagger
- name: 'Gradle tests'
run: ./util/run-local-gradle-tests.sh
shell: bash
@@ -53,13 +58,11 @@ jobs:
steps:
- name: 'Check out repository'
uses: actions/checkout@v2
- - name: 'Cache local Maven repository'
- uses: actions/cache@v2
+ - name: 'Download local snapshot for tests'
+ uses: actions/download-artifact@v2
with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-maven-
+ name: local-snapshot
+ path: ~/.m2/repository/com/google/dagger
- name: 'Gradle Android tests (AGP ${{ matrix.agp }})'
run: ./util/run-local-gradle-android-tests.sh "${{ matrix.agp }}"
shell: bash