Skip to content

Commit

Permalink
Add test for dependency-graph with config-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
bigdaz committed Jan 11, 2024
1 parent 932abbb commit dd59c2c
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/integ-test-dependency-graph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,15 @@ jobs:
- id: gradle-build
run: ./gradlew build
working-directory: .github/workflow-samples/groovy-dsl
- id: gradle-build-again
run: ./gradlew build
working-directory: .github/workflow-samples/groovy-dsl
- name: Check generated dependency graphs
shell: bash
run: |
echo "gradle-assemble report file: ${{ steps.gradle-assemble.outputs.dependency-graph-file }}"
echo "gradle-build report file: ${{ steps.gradle-build.outputs.dependency-graph-file }}"
echo "gradle-build-again report file: ${{ steps.gradle-build-again.outputs.dependency-graph-file }}"
ls -l dependency-graph-reports
if [ ! -e "${{ steps.gradle-assemble.outputs.dependency-graph-file }}" ]; then
echo "Did not find gradle-assemble dependency graph file"
Expand All @@ -104,3 +108,43 @@ jobs:
echo "Did not find gradle-build dependency graph files"
exit 1
fi
if [ ! -e "${{ steps.gradle-build-again.outputs.dependency-graph-file }}" ]; then
echo "Did not find gradle-build-again dependency graph files"
exit 1
fi
config-cache:
strategy:
matrix:
os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Download distribution if required
uses: ./.github/actions/download-dist
- name: Setup Gradle for dependency-graph generate
uses: ./
with:
dependency-graph: generate-and-submit
- id: config-cache-store
run: ./gradlew assemble --configuration-cache
working-directory: .github/workflow-samples/groovy-dsl
- id: config-cache-reuse
run: ./gradlew assemble --configuration-cache
working-directory: .github/workflow-samples/groovy-dsl
- name: Check generated dependency graphs
shell: bash
run: |
echo "config-cache-store report file: ${{ steps.config-cache-store.outputs.dependency-graph-file }}"
echo "config-cache-reuse report file: ${{ steps.config-cache-reuse.outputs.dependency-graph-file }}"
ls -l dependency-graph-reports
if [ ! -e "${{ steps.config-cache-store.outputs.dependency-graph-file }}" ]; then
echo "Did not find config-cache-store dependency graph files"
exit 1
fi
if [ -e "${{ steps.config-cache-reuse.outputs.dependency-graph-file }}" ]; then
echo "No dependency graph file should be generated for config-cache-reuse"
exit 1
fi

0 comments on commit dd59c2c

Please sign in to comment.