Skip to content

removed all of the test if package exists statements #15

removed all of the test if package exists statements

removed all of the test if package exists statements #15

name: test and benchmark
on:
push:
branches: [main]
paths-ignore:
- '**.md'
pull_request:
branches: [main]
paths-ignore:
- '**.md'
jobs:
tests_and_benchmarks:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
go: ['1.18', '1.19', '1.20']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Get coverage/benchmark tools
run: |
go get github.com/ory/go-acc
go get golang.org/x/tools/cmd/cover
go get -u go.bobheadxi.dev/gobenchdata
- name: Run tests, generate coverage
run: make coverage
- name: Benchmark
run: make benchdata-gen
- name: Install goveralls
run: go install github.com/mattn/goveralls
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=artifacts/c.out -service=github
- name: Get short hash
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Upload benchmark artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ format('benchmarks-{0}-{1}-{2}.json', steps.vars.outputs.sha_short, runner.os, matrix.go) }}
path: benchmarks.json