Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event listener for Messenger Contracts #27

Merged
merged 23 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 23 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: CI

on:
pull_request:
tags-ignore: ["*"]
branches: [c4t, dev]
push:
branches: [c4t, dev]
workflow_dispatch:

Expand All @@ -14,47 +11,58 @@ concurrency:
cancel-in-progress: true

env:
go_version: '~1.20.12'
go_version: "~1.23.1"

permissions:
# Required: allow read access to the content for analysis.
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
pull-requests: read
# Optional: allow write access to checks to allow the action to annotate code in the PR.
checks: write

jobs:
unit:
name: Unit Tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Update dependencies
run: git submodule update --init
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: ${{ env.go_version }}
- name: Install libolm
run: sudo apt update && sudo apt-get install -y libolm-dev
- name: build_test
shell: bash
run: ./scripts/build_test.sh
# When the golangci-lint version is updated here, also update it in scripts/lint.sh
lint:
name: Static Analysis
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Update dependencies
run: git submodule update --init
- uses: actions/setup-go@v3
with:
go-version: ${{ env.go_version }}
- name: Install libolm
run: sudo apt update && sudo apt-get install -y libolm-dev
- name: GolangCI-Lint
shell: bash
run: ./scripts/lint.sh
- uses: actions/setup-go@v5
with:
go-version: ${{ env.go_version }}
- name: golangci-lint
mo-c4t marked this conversation as resolved.
Show resolved Hide resolved
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
only-new-issues: true
go_mod_tidy:
name: Check state of go.mod and go.sum
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Update dependencies
run: git submodule update --init
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: ${{ env.go_version }}
- name: Go Mod Tidy
Expand All @@ -63,4 +71,3 @@ jobs:
- name: Check Clean Branch
shell: bash
run: .github/workflows/check-clean-branch.sh

15 changes: 7 additions & 8 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,23 @@

# https://golangci-lint.run/usage/configuration/
run:
skip-dirs:
- camino-matrix-go
timeout: 5m

issues:
# Maximum count of issues with the same text. Set to 0 to disable. Default: 3.
max-same-issues: 0
exclude-dirs: camino-matrix-go

linters:
disable-all: true
enable:
- asciicheck
- bodyclose
# - cyclop TODO enable
# - cyclop TODO enable
- depguard
- dupl
- errcheck
- errorlint
- exportloopref
- copyloopvar
- goconst
- gocritic
- gofmt
Expand Down Expand Up @@ -52,6 +54,3 @@ linters-settings:
desc: github.com/stretchr/testify/require should be used instead.
- pkg: "github.com/golang/mock/gomock"
desc: go.uber.org/mock/gomock should be used instead.
issues:
# Maximum count of issues with the same text. Set to 0 to disable. Default: 3.
max-same-issues: 0
2 changes: 1 addition & 1 deletion camino-messenger-bot-distributor.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ supported_request_types:
evm_private_key: PrivateKey-YOUR_PRIVATE_KEY

# C-Chain RPC URL
rpc_url: https://columbus.camino.network/ext/bc/C/rpc
rpc_url: wss://columbus.camino.network/ext/bc/C/ws

### Booking Token

Expand Down
2 changes: 1 addition & 1 deletion camino-messenger-bot-supplier.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ supported_request_types:
evm_private_key: PrivateKey-YOUR_PRIVATE_KEY

# C-Chain RPC URL
rpc_url: https://columbus.camino.network/ext/bc/C/rpc
rpc_url: wss://columbus.camino.network/ext/bc/C/ws

### Booking Token

Expand Down
Loading