Skip to content

Add ci workflow

Add ci workflow #1

Workflow file for this run

name: CI
on:
push:
jobs:
static-analysis:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: 1.18
- uses: actions/[email protected]
id: go-cache
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54.2
skip-cache: true
args: "--timeout=3m"
test:
runs-on: ubuntu-20.04
services:
rabbitmq:
image: rabbitmq
env:
RABBITMQ_DEFAULT_USER: tonio
RABBITMQ_DEFAULT_PASS: tonio
ports:
- 5672:5672
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: 1.18
- uses: actions/[email protected]
id: go-cache
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: test
run: "go test ./... -v"