Skip to content

chore(ci): build, test, release + installer ready #1

chore(ci): build, test, release + installer ready

chore(ci): build, test, release + installer ready #1

Workflow file for this run

name: Test
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
go-test:
name: Run Go Test
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.21.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: "go.sum"
- name: Test
run: |
go test ./... -coverprofile=coverage.out -covermode=count -v
- name: Upload coverage results to Github artifact
uses: actions/upload-artifact@v3
with:
name: coverage
path: ./coverage.out
upload-codecov:
name: Upload coverage output to Codecov.io
runs-on: ubuntu-latest
needs: go-test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download coverage output file
uses: actions/download-artifact@v3
with:
name: coverage
- name: Upload coverage output to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true
directory: "./"