Skip to content

add initial test coverage, build, benchmarks; add more filter options #1

add initial test coverage, build, benchmarks; add more filter options

add initial test coverage, build, benchmarks; add more filter options #1

Workflow file for this run

name: Go
on:
push:
branches:
- main
tags:
- v*
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Check out code
uses: actions/checkout@v2
- name: Get dependencies
run: go mod download
- name: Run tests
run: go test -v ./...
- name: Run Benchmarks and Store Results
run: go test -bench=. -benchmem ./... 2>&1 | tee bench.txt
- name: Upload Benchmark Results
uses: actions/upload-artifact@v2
with:
name: benchmark-results
path: bench.txt
release:
needs: test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Calculate Version
id: calc_version
run: echo "::set-output name=version::$(cat VERSION)"
continue-on-error: true
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.calc_version.outputs.version }}
release_name: Release ${{ steps.calc_version.outputs.version }}
draft: false
prerelease: false