-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Share the Go build cache when building in Dockerfiles
On my machine this makes image rebuilds go from ~5m to 1.5s. This also required setting DOCKER_BUILDKIT=1 in integration test image builds. I also took the opportunity to bump the Go version used in those tests to Go 1.17 to match the image build processes, and tidied up the workflow files a bit too (renaming for consistency, typos, whitespace, etc.)
- Loading branch information
Showing
13 changed files
with
98 additions
and
111 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Integration tests (K8s) | ||
|
||
on: | ||
pull_request: | ||
branches: ['master'] | ||
|
||
concurrency: | ||
group: int-test-k8s-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
tests: | ||
env: | ||
IMAGE_REPO: 'localhost:5000' | ||
REGISTRY: 'localhost:5000' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- uses: actions/checkout@v2 | ||
- uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Run build-image-and-k8s-integration-test | ||
run: | | ||
make travis-setup | ||
make minikube-setup | ||
make k8s-executor-build-push | ||
make integration-test-k8s |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,28 @@ | ||
name: Integration tests (Run) | ||
|
||
# Triggers the workflow on push or pull request events | ||
on: [pull_request] | ||
on: | ||
pull_request: | ||
branches: ['master'] | ||
|
||
concurrency: | ||
group: int-test-run-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-executor: | ||
tests: | ||
env: | ||
IMAGE_REPO: 'localhost:5000' | ||
REGISTRY: 'localhost:5000' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14 | ||
id: go | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- uses: actions/checkout@v2 | ||
- uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Run integration-test-run | ||
run: | | ||
make travis-setup | ||
make minikube-setup | ||
make integration-test-run | ||
- name: Run integration-test-run | ||
run: | | ||
make travis-setup | ||
make minikube-setup | ||
make integration-test-run |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,20 @@ | ||
name: Unit tests | ||
|
||
# Triggers the workflow on push or pull request events | ||
on: [pull_request] | ||
on: | ||
pull_request: | ||
branches: ['master'] | ||
|
||
concurrency: | ||
group: unit-tests-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-executor: | ||
env: | ||
IMAGE_REPO: 'localhost:5000' | ||
REGISTRY: 'localhost:5000' | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14 | ||
id: go | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Run unit-test | ||
run: | ||
make test | ||
- run: make test |
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
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
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
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
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
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
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