mirror of
https://github.com/mailgun/groupcache.git
synced 2024-11-16 14:10:04 +00:00
46 lines
849 B
YAML
46 lines
849 B
YAML
|
name: CI
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- master
|
||
|
- main
|
||
|
pull_request:
|
||
|
branches:
|
||
|
- master
|
||
|
- main
|
||
|
|
||
|
jobs:
|
||
|
on-pull-request:
|
||
|
name: test
|
||
|
strategy:
|
||
|
matrix:
|
||
|
go-version:
|
||
|
- 1.18.x
|
||
|
- 1.19.x
|
||
|
os: [ ubuntu-latest ]
|
||
|
runs-on: ${{ matrix.os }}
|
||
|
steps:
|
||
|
- name: Checkout
|
||
|
uses: actions/checkout@master
|
||
|
|
||
|
- name: Set up Go
|
||
|
uses: actions/setup-go@v2
|
||
|
with:
|
||
|
go-version: ${{ matrix.go-version }}
|
||
|
|
||
|
- run: go env
|
||
|
|
||
|
- name: Cache deps
|
||
|
uses: actions/cache@v2
|
||
|
with:
|
||
|
path: ~/go/pkg/mod
|
||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||
|
restore-keys: |
|
||
|
${{ runner.os }}-go-
|
||
|
|
||
|
- name: Install deps
|
||
|
run: go mod download
|
||
|
|
||
|
- name: Test
|
||
|
run: go test ./...
|