Skip to content

update: update ci

update: update ci #6

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on: [push, pull_request]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: ^1.18
- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
# Runs a single command using the runners shell
- name: Get go dependencies
run: |
go get
# Runs check dependencies for integratino tests
- name: Get node dependencies
run: |
cd integration_tests && npm install
# Runs a set of commands using the runners shell
- name: Run unit test
run: |
cd testdata && make protos && cd ..
go test ./...
# Runs
- name: Run integration tests
run: |
cd integration_tests
./scripts/test-ci.sh
goreleaser:
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}