blob: 878078eb9d631d116c8545227191bbd17d88061b [file] [log] [blame]
name: Pre-commit checks
on:
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Checkout source code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check license
run: make license-check
- name: Go lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.33.0
make lint
- name: unit test
run: make test
- name: Code coverage
uses: codecov/codecov-action@v1
e2e-tests:
runs-on: ubuntu-latest
strategy:
matrix:
k8s: [v1.19.7, v1.18.8, v1.17.11]
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.15
- uses: actions/checkout@v2
- run: ./scripts/run-e2e-tests.sh -a "test" -n "yk8s" -v "kindest/node:${KIND_NODE_IMAGE}"
env:
KIND_NODE_IMAGE: ${{ matrix.k8s }}