-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUILD/MINOR: ci: create workflow for github
- Loading branch information
Showing
5 changed files
with
61 additions
and
72 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: CI | ||
on: [push, pull_request] | ||
jobs: | ||
go_lint: | ||
name: golangci-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: docker://ghcr.io/haproxytech/go-linter:1.33 | ||
check: | ||
if: ${{ github.event_name == 'pull_request' }} | ||
name: HAProxy check commit message | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: commit-check | ||
uses: docker://ghcr.io/haproxytech/commit-check:3.0.0 | ||
env: | ||
API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
go_build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
needs: ["go_lint"] | ||
steps: | ||
- name: Set up Go 1.17 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.17 | ||
id: go | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
- name: Get dependencies | ||
run: | | ||
go get -v -t -d ./... | ||
- name: Build | ||
run: | | ||
go build -v . | ||
e2e: | ||
name: HAProxy | ||
needs: ["go_lint","go_build"] | ||
strategy: | ||
matrix: | ||
haproxy_version: ["2.1", "2.2", "2.3"] | ||
runs-on: ubuntu-latest | ||
env: | ||
BATS_VERSION: v1.4.1 | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
- name: Downloading required packages | ||
run: sudo apt-get install | ||
- name: Install bats | ||
run: git clone https://github.com/bats-core/bats-core.git && cd bats-core && git checkout $BATS_VERSION && sudo ./install.sh /usr/local && cd .. | ||
- name: Set up Go 1.17 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.17 | ||
- run: make e2e | ||
env: | ||
HAPROXY_VERSION: ${{ matrix.haproxy_version }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.