1
0
mirror of https://git.mills.io/kayos/bitraft.git synced 2024-06-25 00:09:04 +00:00

Migrated to Github Actions

This commit is contained in:
James Mills 2020-02-01 22:48:30 +10:00
parent 47b7324e23
commit c78e0f4ded
No known key found for this signature in database
GPG Key ID: AC4C014F1440EBD6
14 changed files with 233 additions and 10 deletions

@ -1,9 +0,0 @@
kind: pipeline
name: default
steps:
- name: build
image: golang:latest
commands:
- go test -v -short -cover -coverprofile=coverage.txt -coverpkg=$(go list) ./...
- go build .

2
.github/FUNDING.yml vendored Normal file

@ -0,0 +1,2 @@
github: prologic
patreon: prologic

9
.github/labeler.yml vendored Normal file

@ -0,0 +1,9 @@
documentation:
- "**/*.md"
tests:
- "**/*_test.go"
dependencies:
- g0.mod
- go.sum

12
.github/workflows/auto-approve.yml vendored Normal file

@ -0,0 +1,12 @@
name: Auto approve
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: hmarr/auto-approve-action@v2.0.0
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

10
.github/workflows/autoassign.yml vendored Normal file

@ -0,0 +1,10 @@
name: AutoAssigner
on: [pull_request]
jobs:
assignAuthor:
runs-on: ubuntu-latest
steps:
- uses: samspills/assign-pr-to-author@v1.0
if: github.event_name == 'pull_request' && github.event.action == 'opened'
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'

32
.github/workflows/automerge.yml vendored Normal file

@ -0,0 +1,32 @@
name: automerge
on:
pull_request:
types:
- labeled
- unlabeled
- synchronize
- opened
- edited
- ready_for_review
- reopened
- unlocked
pull_request_review:
types:
- submitted
status: {}
jobs:
automerge:
runs-on: ubuntu-latest
steps:
- name: automerge
uses: "pascalgn/automerge-action@a4b03eff945989d41c623c2784d6602560b91e5b"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_LABELS: ""
MERGE_METHOD: "squash"
MERGE_COMMIT_MESSAGE: "automatic"
MERGE_FORKS: "false"
MERGE_RETRIES: "6"
MERGE_RETRY_SLEEP: "10000"
UPDATE_LABELS: ""
UPDATE_METHOD: "rebase"

19
.github/workflows/codecov.yml vendored Normal file

@ -0,0 +1,19 @@
name: Coverage
on: [pull_request]
jobs:
test:
name: Test and Report
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.13.x
- name: Checkout
uses: actions/checkout@v1
- name: Test
run: go test -v -cover -coverprofile=coverage.txt -covermode=atomic -race .
- name: Report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

11
.github/workflows/docker.yml vendored Normal file

@ -0,0 +1,11 @@
name: Docker
on: [pull_request]
jobs:
build:
name: Build Image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Build
run: docker build -t bitraft .

22
.github/workflows/go.yml vendored Normal file

@ -0,0 +1,22 @@
name: Go
on: [pull_request]
jobs:
test:
name: Build and Test
strategy:
matrix:
go-version: [1.12.x, 1.13.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Checkout
uses: actions/checkout@v1
- name: Build
run: go build -v .
- name: Test
run: go test -v -race .

44
.github/workflows/greetings.yml vendored Normal file

@ -0,0 +1,44 @@
name: Greetings
on: [pull_request, issues]
jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: |-
Hello!
Welcome to the Bicask project! Someone will respond to your issue pretty quickly,
the author is pretty responsive 😀 In the meantime; please make sure you have read
the [Contributing](https://github.com/prologic/bitraft/blob/master/CONTRIBUTING.md)
and [Code of Conduct](https://github.com/prologic/bitraft/blob/master/CODE_OF_CONDUCT.md)
documents.
if possible please also make sure your Bug Report or Feature Request is clearly defined
with either examples or a reprodicible case (_if a bug_).
Thank you 😃
pr-message: |-
Hello!
Welcome to the Bicask project!
Thank you for your Pull Request and Contribution! We highly value all contributions to this Project!
Your Pull Request will be reviewed shortly! The author is pretty responsive 😀
In the meantime; please make sure you have read
the [Contributing](https://github.com/prologic/bitraft/blob/master/CONTRIBUTING.md)
and [Code of Conduct](https://github.com/prologic/bitraft/blob/master/CODE_OF_CONDUCT.md)
documents.
Please also ensure that your PR passes all the CI/CD tests -- They will appear in your PR
towards the bottom just above the comment box.
Also in addition, if you haven't already; please ammend your PR by modifying the
[AUTHORS](https://github.com/prologic/bitraft/blob/master/AUTHORS) file and adding
yourself to it! We like to recognize and peserve in Git history all contributors!
Thank you 😃

10
.github/workflows/label.yml vendored Normal file

@ -0,0 +1,10 @@
name: Labeler
on: [pull_request]
jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

28
.github/workflows/reviewdog.yml vendored Normal file

@ -0,0 +1,28 @@
name: ReviewDog
on: [pull_request]
jobs:
golangci-lint:
name: runner / golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: reviewdog/action-golangci-lint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
misspell:
name: runner / misspell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: reviewdog/action-misspell@v1
with:
github_token: ${{ secrets.GItHUB_TOKEN }}
shellcheck:
name: runner / shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: reviewdog/action-shellcheck@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review

29
.github/workflows/stale.yml vendored Normal file

@ -0,0 +1,29 @@
name: Mark stale issues and pull requests
on:
schedule:
- cron: "0 0 * * *"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: |-
This Issue has gone stale and will be closed automatically.
If this is incorrect, please reopen and add the label `on hold`.
Thank you.
stale-pr-message: |-
This Pull Request has gone stale and will be closed automatically.
If this is incorrect, please reopen and add the label `on hold`.
Thank you.
stale-issue-label: 'stale'
exempt-issue-label: 'on hold'
stale-pr-label: 'stale'
exempt-pr-label: 'on hold'

@ -1,6 +1,10 @@
# bitraft
[![Build Status](https://cloud.drone.io/api/badges/prologic/bitraft/status.svg)](https://cloud.drone.io/prologic/bitraft)
![](https://github.com/prologic/bitraft/workflows/Coverage/badge.svg)
![](https://github.com/prologic/bitraft/workflows/Docker/badge.svg)
![](https://github.com/prologic/bitraft/workflows/Go/badge.svg)
![](https://github.com/prologic/bitraft/workflows/ReviewDog/badge.svg)
[![Go Report Card](https://goreportcard.com/badge/prologic/bitraft)](https://goreportcard.com/report/prologic/bitraft)
[![GitHub license](https://img.shields.io/github/license/prologic/bitraft.svg)](https://github.com/prologic/bitraft)
[![Github all releases](https://img.shields.io/github/downloads/prologic/bitraft/total.svg)](https://github.com/prologic/bitraft/releases)