Skip to content

Improve test scripts #213

Improve test scripts

Improve test scripts #213

Workflow file for this run

name: Test
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: ["1.19", "1.20"]
runs-on: ${{ matrix.os }}
steps:
- name: Install tools
run: curl --version
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- name: Test
if: matrix.os != 'ubuntu-latest'
run: go test -v ./pkg/...
- name: Test with coverage
if: matrix.os == 'ubuntu-latest'
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./pkg/...
- name: Codecov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
- name: End to end test
run: make e2e
if: matrix.os == 'ubuntu-latest'