Skip to content

Commit

Permalink
aaaBUILD/MINOR: ci: create workflow for github
Browse files Browse the repository at this point in the history
  • Loading branch information
oktalz committed Sep 6, 2021
1 parent 80ea2b4 commit dab565a
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 62 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/build.yml

This file was deleted.

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

This file was deleted.

62 changes: 62 additions & 0 deletions .github/workflows/github.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
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.on == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- name: check-commit
uses: docker://haproxytech/check-commit:v2.1.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 }}
13 changes: 0 additions & 13 deletions .github/workflows/lint.yml

This file was deleted.

0 comments on commit dab565a

Please sign in to comment.