Skip to content

Api 102

Api 102 #61

Workflow file for this run

name: Node Pool CI
on:
push:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Lint and Test Go Code
runs-on:
- ubuntu-latest
env:
GOPRIVATE: github.com/gateway-fm/perpsv3-Go
GO111MODULE: on
TEST_RPC: ${{ secrets.TEST_RPC }}
TEST_RPC_EVENTS: ${{ secrets.TEST_RPC_EVENTS }}
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup Golang
uses: actions/setup-go@v2
- run: |
go version
go clean -modcache
go mod tidy
- name: Run linter
uses: golangci/golangci-lint-action@v2
with:
version: latest
skip-build-cache: true
skip-pkg-cache: true
- name: Test
run: |
go install -mod=mod github.com/golang/mock/mockgen
make test
- name: Clean workspace
uses: AutoModality/action-clean@v1.1.0
release:
name: Make Release
needs:
- test
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
outputs:
release_tag: ${{ steps.tag_version.outputs.new_tag }}
steps:
- uses: actions/checkout@v2
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.0
with:
github_token: ${{ secrets.RELEASES_ACTION_GITHUB_TOKEN }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
token: ${{ secrets.RELEASES_ACTION_GITHUB_TOKEN }}