Skip to content

Commit

Permalink
more caching in e2e pipeline
Browse files Browse the repository at this point in the history
Signed-off-by: Moritz Wiesinger <[email protected]>
  • Loading branch information
mowies committed Aug 29, 2024
1 parent 5fd6e56 commit 40e7ed5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
go-version: "~1.22.6"
check-latest: true
cache: false
cache-dependency-path: internal/tools/go.sum

- name: Cache tools
id: cache-tools
Expand All @@ -31,7 +31,7 @@ jobs:
path: .tools
key: ci-tools-${{ runner.os }}-${{ hashFiles('internal/tools/go.sum') }}

- name: Touch tools
- name: Install tools
if: steps.cache-tools.outputs.cache-hit != 'true'
run: |
mkdir -p .tools
Expand Down
40 changes: 21 additions & 19 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,29 @@ jobs:
cache-dependency-path: internal/tools/go.sum

- name: Cache tools
id: cache-tools
uses: actions/cache@v4
with:
path: .tools
key: ci-tools-${{ runner.os }}-${{ hashFiles('internal/tools/go.sum') }}
key: e2e-tools-${{ runner.os }}-${{ hashFiles('internal/tools/go.sum') }}

- name: Touch tools
- name: Install tools
if: steps.cache-tools.outputs.cache-hit != 'true'
run: |
mkdir -p .tools
touch .tools/*
make install-tools
- name: Generate source files
run: make generate

- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: e2e-mods-${{ runner.os }}-${{ hashFiles('build/go.sum') }}

- name: Build collector artifact
shell: bash
Expand Down Expand Up @@ -96,15 +110,18 @@ jobs:
cache-dependency-path: internal/tools/go.sum

- name: Cache tools
id: cache-tools
uses: actions/cache@v4
with:
path: .tools
key: ci-tools-${{ runner.os }}-${{ hashFiles('internal/tools/go.sum') }}
key: e2e-tools-${{ runner.os }}-${{ hashFiles('internal/tools/go.sum') }}

- name: Touch tools
- name: Install tools
if: steps.cache-tools.outputs.cache-hit != 'true'
run: |
mkdir -p .tools
touch .tools/*
make install-tools
- name: Create kind cluster
uses: helm/[email protected]
Expand All @@ -123,10 +140,6 @@ jobs:
run: |
docker load --input /tmp/dynatrace-otel-collector.tar
- name: Kind load image
run: |
kind load docker-image dynatrace-otel-collector:e2e-test --name kind
- name: Load Image into Kind
shell: bash
run: |
Expand All @@ -151,17 +164,6 @@ jobs:
check-latest: true
cache-dependency-path: internal/tools/go.sum

- name: Cache tools
uses: actions/cache@v4
with:
path: .tools
key: ci-tools-${{ runner.os }}-${{ hashFiles('internal/tools/go.sum') }}

- name: Touch tools
run: |
mkdir -p .tools
touch .tools/*
- name: Download artifact
uses: actions/download-artifact@v4
with:
Expand Down

0 comments on commit 40e7ed5

Please sign in to comment.