| 1 |
name: build |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
tags: |
| 7 |
pull_request: |
| 8 |
|
| 9 |
jobs: |
| 10 |
build: |
| 11 |
runs-on: ubuntu-latest |
| 12 |
|
| 13 |
steps: |
| 14 |
- name: set up go 1.19 |
| 15 |
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0 |
| 16 |
with: |
| 17 |
go-version: 1.19 |
| 18 |
id: go |
| 19 |
|
| 20 |
- name: checkout |
| 21 |
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 |
| 22 |
|
| 23 |
- name: build and test |
| 24 |
run: | |
| 25 |
go test -timeout=60s -race ./... |
| 26 |
go build -race ./... |
| 27 |
|
| 28 |
- name: build and test ARC |
| 29 |
working-directory: ./arc |
| 30 |
run: | |
| 31 |
go test -timeout=60s -race |
| 32 |
go build -race |
| 33 |
|
| 34 |
- name: install golangci-lint |
| 35 |
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $GITHUB_WORKSPACE v1.53.3 |
| 36 |
|
| 37 |
- name: run golangci-lint |
| 38 |
run: $GITHUB_WORKSPACE/golangci-lint run --out-format=github-actions ./... ./simplelru/... ./expirable/... |
| 39 |
|
| 40 |
- name: run golangci-lint on ARC |
| 41 |
working-directory: ./arc |
| 42 |
run: $GITHUB_WORKSPACE/golangci-lint run --out-format=github-actions ./... |