Skip to content

Commit

Permalink
BUILD/MINOR: ci: create workflow for github
Browse files Browse the repository at this point in the history
  • Loading branch information
oktalz committed Oct 6, 2021
1 parent 4a5e14d commit 969b203
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 72 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
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@v1
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v1
with:
github_token: ${{ secrets.github_token }}
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 }}
24 changes: 0 additions & 24 deletions .github/workflows/build.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .github/workflows/check.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/e2e.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/lint.yml

This file was deleted.

0 comments on commit 969b203

Please sign in to comment.