2021-03-23 11:28:25 +03:00
|
|
|
name: Go
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master]
|
|
|
|
pull_request:
|
|
|
|
branches: [master]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
2021-09-27 12:08:34 +03:00
|
|
|
fail-fast: false
|
2021-03-23 11:28:25 +03:00
|
|
|
matrix:
|
2022-03-22 07:30:59 +03:00
|
|
|
go-version: [1.17.x, 1.18.x]
|
2021-03-23 11:28:25 +03:00
|
|
|
|
|
|
|
services:
|
|
|
|
redis:
|
|
|
|
image: redis
|
|
|
|
options: >-
|
|
|
|
--health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
|
|
|
|
ports:
|
|
|
|
- 6379:6379
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up ${{ matrix.go-version }}
|
2022-04-11 04:27:39 +03:00
|
|
|
uses: actions/setup-go@v3
|
2021-03-23 11:28:25 +03:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
|
|
|
|
- name: Checkout code
|
2022-03-07 04:24:03 +03:00
|
|
|
uses: actions/checkout@v3
|
2021-03-23 11:28:25 +03:00
|
|
|
|
|
|
|
- name: Test
|
|
|
|
run: make test
|