Skip to content

Commit

Permalink
Merge branch 'main' into feature/github-actions
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/test.yaml
#	README.md
  • Loading branch information
m-terra committed Aug 29, 2022
2 parents e883da1 + ef569cc commit 75ee28d
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 16 deletions.
72 changes: 72 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'

categories:
- title: '🚀 Features'
labels:
- 'feature'
- title: '💪 Enhancement'
labels:
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
- title: '🔧 Refactoring'
label: 'refactor'
- title: '📖 Documentation'
label: 'documentation'
- title: '⛓️ Dependency update'
label: 'dependencies'

change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.

version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## Changes
$CHANGES
autolabeler:
- label: feature
branch:
- '/^feat(ure)?[/-].+/'
- label: bug
branch:
- '/^fix[/-].+/'
- label: chore
branch:
- '/^chore[/-].+/'
- label: refactor
branch:
- '/(refactor|refactoring)[/-].+/'
- label: documentation
branch:
- '/doc(umentation)[/-].+/'
files:
- '*.md'
- label: enhancement
branch:
- '/(enhancement|improve)[/-].+/'
- label: docker
files:
- 'docker/**/*'
- 'Dockerfile'
- '.dockerignore'
- label: github
files:
- '.github/**/*'
37 changes: 37 additions & 0 deletions .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main
# pull_request event is required only for autolabeler
# pull_request:
# Only following types are handled by the action, but one can default to all as well
# types: [opened, reopened, synchronize]
# pull_request_target event is required for autolabeler to support PRs from forks
pull_request_target:
branches:
- main
types: [opened, reopened, synchronize]

jobs:
update_release_draft:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
# (Optional) GitHub Enterprise requires GHE_HOST variable set
#- name: Set GHE_HOST
# run: |
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV

# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
31 changes: 18 additions & 13 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
name: Test
on: push
on: [push, pull_request]

jobs:
build:
name: Test
test:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.18
- name: Checkout
uses: actions/checkout@v2

- name: Set up go
uses: actions/setup-go@v2
with:
go-version: 1.18

- name: golangci-lint
uses: golangci/golangci-lint-action@v3

- name: Test
run: make test
env:
CGO_ENABLED: 0
GO111MODULE: on
GOOS: linux
GOARCH: amd64
run: make unit-test

- name: Upload coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ lint: lint-bin ## Run go golangci-lint against code.
$(GOLANGCI_LINT) run --timeout 5m0s

unit-test: mocks
go test -v ./... --vet=off
go test -v ./... --vet=off -coverprofile cover.out

# Generate mocks
mocks: mockgen
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# acos-client-go

[![GitHub Action](https://img.shields.io/badge/GitHub-Action-blue)](https://github.com/features/actions)
[![Documentation](https://img.shields.io/badge/godoc-reference-5272B4.svg)](https://pkg.go.dev/github.com/ureuzy/acos-client-go)
[![Test](https://img.shields.io/github/workflow/status/ureuzy/acos-client-go/Test?label=tests&logo=github)](https://github.com/ureuzy/acos-client-go/actions)
[![Go Report Card](https://goreportcard.com/badge/github.com/ureuzy/acos-client-go)](https://goreportcard.com/report/github.com/ureuzy/acos-client-go)
[![Go Reference](https://pkg.go.dev/badge/github.com/ureuzy/acos-client-go.svg)](https://pkg.go.dev/github.com/ureuzy/acos-client-go)
[![report](https://goreportcard.com/badge/github.com/ureuzy/acos-client-go)](https://goreportcard.com/report/github.com/ureuzy/acos-client-go)
[![codecov](https://codecov.io/gh/ureuzy/acos-client-go/branch/main/graph/badge.svg?token=E0L2IRLDTZ)](https://codecov.io/gh/ureuzy/acos-client-go)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

# acos-client-go

A simple go client for [a10 networks](https://www.a10networks.com/)' aXAPI

[ACOS 4.1.4-P1 aXAPIv3 Reference Document](https://documentation.a10networks.com/ACOS/414x/ACOS_4_1_4-P1/html/axapiv3/index.html#)
Expand Down

0 comments on commit 75ee28d

Please sign in to comment.