-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
65 additions
and
57 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
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 |
---|---|---|
|
@@ -25,8 +25,6 @@ jobs: | |
output: ${{ steps.export_tag.outputs.image_tag }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Docker meta | ||
id: docker_meta | ||
|
@@ -46,19 +44,35 @@ jobs: | |
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: depot/setup-action@v1 | ||
- name: Build and push docker image | ||
id: docker_build | ||
uses: depot/bake-action@v1 | ||
- name: Set up Depot CLI | ||
uses: depot/setup-action@v1 | ||
|
||
- name: Build test image | ||
uses: depot/build-push-action@v1 | ||
with: | ||
files: | | ||
./docker-bake.hcl | ||
${{ steps.docker_meta.outputs.bake-file }} | ||
./docker-bake.platforms.hcl | ||
targets: rollups-node-ci | ||
file: Dockerfile | ||
context: . | ||
target: go-builder | ||
platforms: linux/amd64,linux/arm64 | ||
tags: ghcr.io/cartesi/rollups-node-ci:${{steps.docker_meta.outputs.version}} | ||
push: true | ||
cache-from: type=gha,scope=debian | ||
cache-to: type=gha,mode=max,scope=debian | ||
project: ${{ vars.DEPOT_PROJECT }} | ||
workdir: build | ||
token: ${{ secrets.DEPOT_TOKEN }} | ||
|
||
- name: Build devnet image | ||
uses: depot/build-push-action@v1 | ||
with: | ||
file: test/devnet/Dockerfile | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
tags: ghcr.io/cartesi/rollups-node-devnet:${{steps.docker_meta.outputs.version}} | ||
push: true | ||
cache-from: type=gha,scope=debian | ||
cache-to: type=gha,mode=max,scope=debian | ||
project: ${{ vars.DEPOT_PROJECT }} | ||
token: ${{ secrets.DEPOT_TOKEN }} | ||
|
||
- name: Export Image Tag | ||
id : export_tag | ||
|
@@ -107,7 +121,7 @@ jobs: | |
|
||
- name: Fix VCS Issue | ||
run : git config --global --add safe.directory /__w/rollups-node/rollups-node | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
|
@@ -118,47 +132,32 @@ jobs: | |
|
||
test-go: | ||
runs-on: ubuntu-22.04 | ||
container: | ||
image: ghcr.io/cartesi/rollups-node-ci:${{needs.build-ci-base.outputs.output}} | ||
needs: | ||
- build-ci-base | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: depot/setup-action@v1 | ||
- name: Build dependency images | ||
uses: depot/bake-action@v1 | ||
with: | ||
files: | | ||
./docker-bake.hcl | ||
./docker-bake.override.hcl | ||
./docker-bake.platforms.hcl | ||
targets: | | ||
rollups-node-devnet | ||
rollups-node-snapshot | ||
project: ${{ vars.DEPOT_PROJECT }} | ||
workdir: build | ||
load: true | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: Fix VCS Go Linter Issue | ||
run : git config --global --add safe.directory /__w/rollups-node/rollups-node | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Run Go Linter | ||
uses: golangci/golangci-lint-action@v6 | ||
- uses: hoverkraft-tech/[email protected] | ||
env: | ||
TAG: ${{needs.build-ci-base.outputs.output}} | ||
REGISTRY: ghcr.io/ | ||
with: | ||
version: v1.58.2 | ||
workdir: build | ||
compose-file: "compose.individual-services.yaml" | ||
services: | | ||
ethereum_provider | ||
database | ||
migration | ||
- name: Run Go tests | ||
env: | ||
TESTCONTAINERS_RYUK_DISABLED: true | ||
run: go test ./... | ||
run: docker run --rm -it ghcr.io/cartesi/rollups-node-ci:${{needs.build-ci-base.outputs.output}} make -C rollups-node unit-test-go GO_TEST_PACKAGES=./internal/advancer/ | ||
|
||
build-docker: | ||
runs-on: ubuntu-22.04 | ||
|
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