Skip to content

Commit

Permalink
Merge pull request #7 from probe-lab/ci
Browse files Browse the repository at this point in the history
chore: add ci
  • Loading branch information
guillaumemichel authored Oct 16, 2024
2 parents 72fb552 + 5cd54c4 commit d2863e2
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 7 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: continuous integration

on:
push:
branches: [main]
pull_request:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
go-version: [1.21, 1.22]

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: true

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-
- name: Install dependencies
run: go mod download

- name: Check Go fmt
run: |
if ! go fmt ./...; then
echo "Go fmt check failed"
exit 1
fi
- name: Run Go vet
run: go vet ./...

- name: Run tests
run: go test ./... -v -cover
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Ants
# Ants Watch

Celestia Lightnode Population Monitor.

Author: [guillaumemichel](https://github.com/guillaumemichel)
<img src="./resources/ants.png" alt="Ants Watch" height="300"/>

Authors: [guillaumemichel](https://github.com/guillaumemichel), [kasteph](https://github.com/kasteph)

## Setup

Before installing dependencies:

``` shell
$ git submodule init
$ git submodule update --init --recursive --remote
git submodule init
git submodule update --init --recursive --remote
```

Then, `go mod tidy`.
Expand Down
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ replace (

go 1.23.1

toolchain go1.23.2

require (
github.com/friendsofgo/errors v0.9.2
github.com/golang-migrate/migrate/v4 v4.18.1
Expand Down Expand Up @@ -91,7 +93,7 @@ require (
github.com/huin/goupnp v1.3.0 // indirect
github.com/ipfs/boxo v0.24.0 // indirect
github.com/ipfs/go-cid v0.4.1
github.com/ipfs/go-datastore v0.6.0 // indirect
github.com/ipfs/go-datastore v0.6.0
github.com/ipfs/go-log/v2 v2.5.1
github.com/ipld/go-ipld-prime v0.21.0 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
Expand Down Expand Up @@ -170,7 +172,7 @@ require (
go.uber.org/fx v1.22.2 // indirect
go.uber.org/mock v0.4.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
go.uber.org/zap v1.27.0
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
golang.org/x/mod v0.21.0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion queen.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func NewQueen(ctx context.Context, dbConnString string, keysDbPath string, nPort

dbPort, err := strconv.Atoi(os.Getenv("DB_PORT"))
if err != nil {
fmt.Errorf("Port must be an integer", err)
logger.Errorf("Port must be an integer", err)
}

mP, _ := tele.NewMeterProvider()
Expand Down
Binary file added resources/ants.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d2863e2

Please sign in to comment.