-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #833 from gobitfly/staging
Merge staging->main
- Loading branch information
Showing
71 changed files
with
2,282 additions
and
1,884 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,39 @@ | ||
name: Backend-Integration-Test | ||
on: | ||
push: | ||
paths: | ||
- 'backend/**' | ||
branches: | ||
- main | ||
- staging | ||
pull_request: | ||
paths: | ||
- 'backend/**' | ||
branches: | ||
- '*' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: read | ||
checks: write | ||
|
||
jobs: | ||
build: | ||
name: integration-test | ||
runs-on: self-hosted | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'backend/go.mod' | ||
cache-dependency-path: 'backend/go.sum' | ||
- name: Test with the Go CLI | ||
working-directory: backend | ||
run: go test ./pkg/api/... -config "${{ secrets.CI_CONFIG_PATH }}" | ||
|
||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package archiver | ||
|
||
import ( | ||
"flag" | ||
"os" | ||
|
||
dataaccess "github.com/gobitfly/beaconchain/pkg/api/data_access" | ||
|
||
"github.com/gobitfly/beaconchain/pkg/commons/log" | ||
"github.com/gobitfly/beaconchain/pkg/commons/types" | ||
"github.com/gobitfly/beaconchain/pkg/commons/utils" | ||
"github.com/gobitfly/beaconchain/pkg/commons/version" | ||
|
||
"github.com/gobitfly/beaconchain/pkg/archiver" | ||
) | ||
|
||
func Run() { | ||
fs := flag.NewFlagSet("fs", flag.ExitOnError) | ||
configPath := fs.String("config", "", "Path to the config file, if empty string defaults will be used") | ||
versionFlag := fs.Bool("version", false, "Show version and exit") | ||
_ = fs.Parse(os.Args[2:]) | ||
|
||
if *versionFlag { | ||
log.Info(version.Version) | ||
log.Info(version.GoVersion) | ||
return | ||
} | ||
|
||
cfg := &types.Config{} | ||
err := utils.ReadConfig(cfg, *configPath) | ||
if err != nil { | ||
log.Fatal(err, "error reading config file", 0) | ||
} | ||
utils.Config = cfg | ||
|
||
log.InfoWithFields(log.Fields{"config": *configPath, "version": version.Version, "commit": version.GitCommit, "chainName": utils.Config.Chain.ClConfig.ConfigName}, "starting") | ||
|
||
dataAccessor := dataaccess.NewDataAccessService(cfg) | ||
defer dataAccessor.Close() | ||
|
||
archiver, err := archiver.NewArchiver(dataAccessor) | ||
if err != nil { | ||
log.Fatal(err, "error initializing archiving service", 0) | ||
} | ||
go archiver.Start() | ||
utils.WaitForCtrlC() | ||
} |
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
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
Oops, something went wrong.