Skip to content

Add go.mod and GH actions #1

Add go.mod and GH actions

Add go.mod and GH actions #1

Workflow file for this run

on:
push:
tags:
- v*
branches:
- master
pull_request:
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.21.x, 1.22.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies
run: go get ./...
- name: Test
run: |
go test ./...