Browse Source

Fix cache is overriden randomly after build and before tests (#14808)

* Fix cache is overriden randomly after build and before tests
* Update backend.yml
* Update unit-test.yml
3.2.1-prepare
kezhenxu94 1 year ago committed by GitHub
parent
commit
294a6225f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      .github/workflows/api-test.yml
  2. 3
      .github/workflows/backend.yml
  3. 6
      .github/workflows/e2e.yml
  4. 5
      .github/workflows/publish-docker.yaml
  5. 3
      .github/workflows/unit-test.yml

7
.github/workflows/api-test.yml

@ -60,7 +60,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-api-test
restore-keys: ${{ runner.os }}-maven-
- name: Build Image
run: |
@ -68,8 +68,7 @@ jobs:
-Dmaven.test.skip \
-Dmaven.javadoc.skip \
-Dspotless.skip=true \
-Pdocker,release -Ddocker.tag=ci \
-pl dolphinscheduler-standalone-server -am
-Pdocker,release -Ddocker.tag=ci
- name: Export Docker Images
run: |
docker save apache/dolphinscheduler-standalone-server:ci -o /tmp/standalone-image.tar \
@ -112,7 +111,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-api-test
restore-keys: ${{ runner.os }}-maven-
- uses: actions/download-artifact@v2
name: Download Docker Images

3
.github/workflows/backend.yml

@ -75,7 +75,8 @@ jobs:
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-backend
restore-keys: ${{ runner.os }}-maven-
- name: Build and Package on ${{ matrix.java }}
run: |
./mvnw -B clean install \

6
.github/workflows/e2e.yml

@ -60,7 +60,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-e2e
restore-keys: ${{ runner.os }}-maven-
- name: Build Image
run: |
@ -130,7 +130,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-e2e
restore-keys: ${{ runner.os }}-maven-
- uses: actions/download-artifact@v2
name: Download Docker Images
@ -174,7 +174,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-e2e
restore-keys: ${{ runner.os }}-maven-
- uses: actions/download-artifact@v2
name: Download Docker Images

5
.github/workflows/publish-docker.yaml

@ -38,9 +38,8 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-docker
restore-keys: ${{ runner.os }}-maven-
- name: Set environment variables
run: |
if [[ ${{ github.event_name }} == "release" ]]; then

3
.github/workflows/unit-test.yml

@ -72,7 +72,8 @@ jobs:
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-unit-test
restore-keys: ${{ runner.os }}-maven-
- name: Run Unit tests
run: ./mvnw clean verify -B -Dmaven.test.skip=false -Dspotless.skip=true

Loading…
Cancel
Save