Skip to content

Build and test code #303

Build and test code

Build and test code #303

Workflow file for this run

name: Build and test code
on: [push, pull_request]
jobs:
run-tests:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
golang-version: ["1.21"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup golang
uses: actions/setup-go@v5
with:
go-version: "^${{ matrix.golang-version }}"
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ matrix.os }}-${{ matrix.golang-version }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.golang-version }}-go-
- run: mkdir cmd/test_artifacts
- run: go test -v -cover ./...