diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..14efa83 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: prologic +patreon: prologic diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..5eb9eae --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,9 @@ +documentation: + - "**/*.md" + +tests: + - "**/*_test.go" + +dependencies: + - g0.mod + - go.sum diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml new file mode 100644 index 0000000..1485152 --- /dev/null +++ b/.github/workflows/auto-approve.yml @@ -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 }}" diff --git a/.github/workflows/autoassign.yml b/.github/workflows/autoassign.yml new file mode 100644 index 0000000..d942069 --- /dev/null +++ b/.github/workflows/autoassign.yml @@ -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 }}' diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 0000000..03f87ec --- /dev/null +++ b/.github/workflows/codecov.yml @@ -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 }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..a53ac5c --- /dev/null +++ b/.github/workflows/docker.yml @@ -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 . diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..0fe74f1 --- /dev/null +++ b/.github/workflows/go.yml @@ -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 . diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100644 index 0000000..eefada0 --- /dev/null +++ b/.github/workflows/greetings.yml @@ -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 😃 diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml new file mode 100644 index 0000000..afcd7b5 --- /dev/null +++ b/.github/workflows/label.yml @@ -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 }}" diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml new file mode 100644 index 0000000..2ed1824 --- /dev/null +++ b/.github/workflows/reviewdog.yml @@ -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 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..c77dc20 --- /dev/null +++ b/.github/workflows/stale.yml @@ -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'