Skip to content

Commit

Permalink
fix(docker-chaosnet): release snapshot docker build failed CI (#1847)
Browse files Browse the repository at this point in the history
* fix(docker-chaosnet): add copy step for geth dependency

* chore: changelog

* ci: conditional workflows should account for other go.mod and go.sum files

* ci: changing docker changes the build, so it should be a dep

* fix(docker): test builds locally with 'docker build -d nibi-test .'
  • Loading branch information
Unique-Divine authored Apr 16, 2024
1 parent 1a46a9b commit da22964
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name: Linter
on:
push:
branches: ["main"]
paths: ["**.go", "**.proto", "go.mod", "go.sum"]
paths: ["**.go", "**.proto", "go.mod", "go.sum", "**go.mod", "**go.sum"]
pull_request:
paths: ["**.go", "**.proto", "go.mod", "go.sum"]
paths: ["**.go", "**.proto", "go.mod", "go.sum", "**go.mod", "**go.sum"]

# Allow concurrent runs on main/release branches but isolates other branches
concurrency:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- cron: "0 0 * * *" # Runs automatically every day
pull_request:
# paths makes the action run only when the given paths are changed
paths: ["**.go", "**.proto", "go.mod", "go.sum"]
paths: ["**.go", "**.proto", "go.mod", "go.sum", "**go.mod", "**go.sum"]

# Allow concurrent runs on main/release branches but isolates other branches
concurrency:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Unit Tests

on:
pull_request:
paths: ["**.go", "**.proto", "go.mod", "go.sum"]
paths: ["**.go", "**.proto", "go.mod", "go.sum", "**go.mod", "**go.sum", "contrib/docker/*"]

# Allow concurrent runs on main/release branches but isolates other branches
concurrency:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#1837](https://github.com/NibiruChain/nibiru/pull/1837) - feat(eth): protos, eth types, and evm module types
- [#1838](https://github.com/NibiruChain/nibiru/pull/1838) - feat(eth): Go-ethereum, crypto, encoding, and unit tests for evm/types
- [#1841](https://github.com/NibiruChain/nibiru/pull/1841) - feat(eth): Collections encoders for bytes, Ethereum addresses, and Ethereum hashes
- [#1847](https://github.com/NibiruChain/nibiru/pull/1847) - fix(docker-chaosnet): release snapshot docker build failed CI.

#### Dapp modules: perp, spot, etc

Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ FROM golang:1.21 AS builder

WORKDIR /nibiru

COPY go.sum go.mod ./
# copy go.mod, go.sum to WORKDIR
COPY go.sum go.mod ./
# copy geth to WORKDIR/geth
COPY geth ./geth
RUN go mod download
COPY . .

Expand Down
8 changes: 6 additions & 2 deletions contrib/docker/chaosnet.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ FROM golang:1.21 AS builder

WORKDIR /nibiru

COPY go.sum go.mod ./
# copy go.mod, go.sum to WORKDIR
COPY go.sum go.mod ./
# copy geth to WORKDIR/geth
COPY geth ./geth
RUN go mod download
COPY . .
# copy the rest of the project to WORKDIR
COPY . .

RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg \
Expand Down

0 comments on commit da22964

Please sign in to comment.