-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: avoid template and reuse dockers
- Loading branch information
1 parent
6dfb5d3
commit 4f056d3
Showing
3 changed files
with
102 additions
and
31 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 |
---|---|---|
|
@@ -6,29 +6,98 @@ on: | |
- '**' | ||
|
||
jobs: | ||
free-disk-space: | ||
runs-on: ubuntu-latest | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
tool-cache: true | ||
|
||
lint_test: | ||
needs: free-disk-space | ||
uses: babylonlabs-io/.github/.github/workflows/[email protected] | ||
secrets: inherit | ||
with: | ||
run-unit-tests: true | ||
run-integration-tests: true | ||
run-lint: true | ||
integration-tests-command: | | ||
sudo make test-e2e | ||
# docker_pipeline: | ||
# uses: babylonlabs-io/.github/.github/workflows/[email protected] | ||
# secrets: inherit | ||
# with: | ||
# publish: false | ||
# dockerfile: ./contrib/images/babylond/Dockerfile | ||
# repoName: babylond | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.21 | ||
|
||
- name: Print Go environment | ||
run: go env | ||
|
||
- name: Build Application | ||
run: make build | ||
|
||
# needs: build, in other jobs is to utilize the go cache created by build | ||
lint: | ||
needs: build | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.21 | ||
|
||
- name: Run Lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: v1.59 | ||
args: --timeout=10m | ||
|
||
unit-tests: | ||
needs: build | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.21 | ||
|
||
- name: Run Unit Tests | ||
run: | | ||
make test | ||
check-mock-gen: | ||
needs: build | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.21 | ||
|
||
- name: Run make mock-gen | ||
run: make mocks | ||
|
||
- name: Check for uncommitted changes | ||
run: | | ||
if ! git diff --exit-code; then | ||
echo "Uncommitted changes detected. Please run 'make mocks' before committing." | ||
exit 1 | ||
fi | ||
build-integration-tests: | ||
needs: build | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build E2E Dockers | ||
run: | | ||
sudo make build-docker-e2e | ||
run-integration-tests: | ||
needs: build-integration-tests | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run E2E Tests | ||
run: | | ||
sudo make test-e2e-cache |
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