Add Github Workflows (#5)

This commit is contained in:
James Mills 2020-03-29 08:36:14 +10:00 committed by GitHub
parent 9b159b32cb
commit 0869bca23c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 214 additions and 0 deletions

2
.github/FUNDING.yml vendored Normal file
View file

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

9
.github/labeler.yml vendored Normal file
View file

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

11
.github/workflows/auto-approve.yml vendored Normal file
View file

@ -0,0 +1,11 @@
---
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 }}"

11
.github/workflows/autoassign.yml vendored Normal file
View file

@ -0,0 +1,11 @@
---
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 }}'

24
.github/workflows/codecov.yml vendored Normal file
View file

@ -0,0 +1,24 @@
---
name: Coverage
on:
push:
branches:
- master
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 }}

16
.github/workflows/docker.yml vendored Normal file
View file

@ -0,0 +1,16 @@
---
name: Docker
on:
push:
branches:
- master
pull_request:
jobs:
build:
name: Build Image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Build
run: docker build -t tube .

27
.github/workflows/go.yml vendored Normal file
View file

@ -0,0 +1,27 @@
---
name: Go
on:
push:
branches:
- master
pull_request:
jobs:
test:
name: Build and Test
strategy:
matrix:
go-version: [1.12.x, 1.13.x]
platform: [ubuntu-latest, macos-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 .

43
.github/workflows/greetings.yml vendored Normal file
View file

@ -0,0 +1,43 @@
---
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 Tube 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/tube/blob/master/CONTRIBUTING.md)
and [Code of Conduct](https://github.com/prologic/tube/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 Tube 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/tube/blob/master/CONTRIBUTING.md)
and [Code of Conduct](https://github.com/prologic/tube/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 amend your PR by modifying the
[AUTHORS](https://github.com/prologic/tube/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
View 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 }}"

33
.github/workflows/reviewdog.yml vendored Normal file
View file

@ -0,0 +1,33 @@
---
name: ReviewDog
on:
push:
branches:
- master
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

28
.github/workflows/stale.yml vendored Normal file
View file

@ -0,0 +1,28 @@
---
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'