CA file #656
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2021 The forwarder Authors. All rights reserved. | |
# Use of this source code is governed by a MIT | |
# license that can be found in the LICENSE file. | |
--- | |
name: Go | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set version env variables | |
run: | | |
cat .version >> $GITHUB_ENV | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "${{env.GO_VERSION}}" | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: "${{env.GOLANGCI_LINT_VERSION}}" | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set version env variables | |
run: | | |
cat .version >> $GITHUB_ENV | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "${{env.GO_VERSION}}" | |
- name: Run unit test | |
run: make test coverage | |
e2e: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set version env variables | |
run: | | |
cat .version >> $GITHUB_ENV | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "${{env.GO_VERSION}}" | |
- name: Build Docker image | |
run: make update-devel-image | |
- name: Run e2e test | |
run: cd e2e && make run-e2e | |
- name: Dump Logs | |
if: failure() | |
run: cd e2e && make dump-logs |