feat: add block route mempool source #634
This file contains hidden or 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
| name: Go Project CI | |
| concurrency: | |
| group: ci-workflow-${{ github.ref }}-${{ github.event_name }} | |
| cancel-in-progress: true | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - ci | |
| pull_request: | |
| branches: | |
| - "*" | |
| env: | |
| SERVICE: tradinglib | |
| jobs: | |
| prepare: | |
| runs-on: [ubuntu-22.04] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| lint: | |
| name: Run golangci-lint | |
| runs-on: [ubuntu-22.04] | |
| needs: | |
| - prepare | |
| steps: | |
| - name: Add git config for Go private module | |
| run: git config --global url."https://${{ secrets.GH_PAT }}:[email protected]/".insteadOf https://github.com/ | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.23.x" | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v7 | |
| with: | |
| version: v2.1 | |
| args: --config=.golangci.yml | |
| skip-cache: true | |
| test: | |
| runs-on: [ubuntu-22.04] | |
| services: | |
| postgres: | |
| image: postgres:14-alpine | |
| env: | |
| POSTGRES_PASSWORD: test | |
| POSTGRES_USER: test | |
| POSTGRES_DB: test | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| needs: | |
| - prepare | |
| steps: | |
| - name: Add git config for Go private module | |
| run: git config --global url."https://${{ secrets.GH_PAT }}:[email protected]/".insteadOf https://github.com/ | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.23.x" | |
| - name: Run test | |
| run: go test -race -v ./... |