Files
avo/.github/workflows/ci.yml
Michael McLoughlin 429cf3cdbf ci: bump to go 1.19 (#330)
* Bump CI to Go 1.19
* Update golang/go edwards25519 test
* Apply formatting to printer stubs output (to get correct comment formatting)
* Bump gofumpt version
2022-09-05 22:15:01 -07:00

85 lines
2.5 KiB
YAML

name: ci
permissions:
contents: read
on:
push:
branches:
- master
pull_request:
schedule:
- cron: "17 12 * * 6"
jobs:
# Required job is a stub which only runs when other dependencies complete
# successfully. This is intended to be listed as a required check in a branch
# protection rule.
required:
needs:
- test
- lint
runs-on: ubuntu-latest
steps:
- run: "true"
test:
strategy:
matrix:
go-version: [1.18.x, 1.19.x]
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v3.0.0
with:
go-version: ${{ matrix.go-version }}
check-latest: true
- name: Configure Go Environment
run: |
echo GOPATH=${{ runner.workspace }} >> $GITHUB_ENV
echo ${{ runner.workspace }}/bin >> $GITHUB_PATH
- name: Go Environment
run: go env
- name: Checkout code
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
with:
persist-credentials: false
- name: Bootstrap
run: ./script/bootstrap
- name: Build
run: go build ./...
- name: Test
run: go test -bench . ./...
- name: Coverage
run: ./script/coverage
- name: Upload Unit Test Coverage
uses: codecov/codecov-action@51d810878be5422784e86451c0e7c14e5860ec47 # v2.0.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: unittests.coverprofile
flags: unittests
- name: Upload Integration Test Coverage
uses: codecov/codecov-action@51d810878be5422784e86451c0e7c14e5860ec47 # v2.0.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: integration.coverprofile
flags: integration
lint:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab # v3.0.0
with:
go-version: 1.19.x
check-latest: true
- name: Configure Go Environment
run: |
echo GOPATH=${{ runner.workspace }} >> $GITHUB_ENV
echo ${{ runner.workspace }}/bin >> $GITHUB_PATH
- name: Go Environment
run: go env
- name: Checkout code
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
with:
persist-credentials: false
- name: Bootstrap
run: ./script/bootstrap
- name: Lint
run: ./script/lint