forked from forbole/callisto
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* CI workflow * fix upper branch name * fix * start postgres * remove workflows * upgrade crust
- Loading branch information
1 parent
a3cd22b
commit ed49d38
Showing
8 changed files
with
82 additions
and
142 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,57 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: [ chains/coreum ] | ||
pull_request: | ||
branches: [ chains/coreum ] | ||
schedule: | ||
- cron: '0 1 * * 1' # At 01:00 on Monday | ||
workflow_dispatch: | ||
|
||
jobs: | ||
ci: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ci_step: [ | ||
"test", | ||
] | ||
include: | ||
- ci_step: "test" | ||
command: | | ||
docker run --name bdjuno-test-db -e POSTGRES_USER=bdjuno -e POSTGRES_PASSWORD=password -e POSTGRES_DB=bdjuno -d -p 6433:5432 postgres | ||
bdjuno-builder test | ||
linter-cache: false | ||
codecov: true | ||
codecov-name: coreum | ||
|
||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Go version used to build builder | ||
run: go version | ||
- name: Checkout bdjuno | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
path: bdjuno | ||
- name: Set up build system | ||
run: | | ||
echo "$(pwd)/bdjuno/bin" >> $GITHUB_PATH | ||
- name: Retrieve go version | ||
id: goversion | ||
run: echo "GO_VERSION=$(bdjuno/bin/go version)" >> $GITHUB_OUTPUT | ||
- name: Print go version | ||
run: echo ${{ steps.goversion.outputs.GO_VERSION }} | ||
- name: Setup go cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cache/go-build | ||
~/go/pkg/mod | ||
key: ${{ runner.os }}-go-v2-${{ hashFiles('**/go.sum') }}-${{ steps.goversion.outputs.GO_VERSION }} | ||
- name: Prepare dependencies | ||
run: | | ||
bdjuno-builder build/me | ||
bdjuno-builder download | ||
- name: Run ${{ matrix.ci_step }} | ||
run: ${{ matrix.command }} |
This file was deleted.
Oops, something went wrong.
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
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,36 +1,10 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
"os" | ||
"path/filepath" | ||
|
||
selfBuild "github.com/CoreumFoundation/bdjuno/build" | ||
"github.com/CoreumFoundation/coreum-tools/pkg/build" | ||
"github.com/CoreumFoundation/coreum-tools/pkg/logger" | ||
"github.com/CoreumFoundation/coreum-tools/pkg/must" | ||
"github.com/CoreumFoundation/coreum-tools/pkg/run" | ||
) | ||
|
||
func main() { | ||
run.Tool("build", func(ctx context.Context) error { | ||
flags := logger.Flags(logger.ToolDefaultConfig, "build") | ||
if err := flags.Parse(os.Args[1:]); err != nil { | ||
return err | ||
} | ||
exec := build.NewExecutor(selfBuild.Commands) | ||
if build.Autocomplete(exec) { | ||
return nil | ||
} | ||
|
||
changeWorkingDir() | ||
return build.Do(ctx, "bdjuno", flags.Args(), exec) | ||
}) | ||
} | ||
|
||
// changeWorkingDir sets working dir to the root directory of repository. | ||
func changeWorkingDir() { | ||
must.OK(os.Chdir(filepath.Dir(filepath.Dir(filepath.Dir(must.String( | ||
filepath.EvalSymlinks(must.String(os.Executable())), | ||
)))))) | ||
build.Main(selfBuild.Commands) | ||
} |
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