mirror of
https://github.com/tuneinsight/lattigo.git
synced 2025-09-13 03:27:14 +00:00
59 lines
1.2 KiB
YAML
59 lines
1.2 KiB
YAML
name: CI Checks
|
|
on:
|
|
push:
|
|
jobs:
|
|
checks:
|
|
name: Run static checks
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.17
|
|
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: ~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-tools-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-tools
|
|
|
|
- name: Setup tools
|
|
run: make get_tools
|
|
|
|
- name: Run Makefile checks
|
|
run: make static_check
|
|
|
|
tests:
|
|
name: Run Go ${{ matrix.go }} tests
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
go: [ '1.18', '1.17', '1.16', '1.15', '1.14', '1.13' ]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: ${{ matrix.go }}
|
|
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.cache/go-build
|
|
~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-build-
|
|
|
|
- name: Build
|
|
run: go build ./...
|
|
|
|
- name: Run Makefile tests
|
|
run: make test
|