Skip to content

Foo #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[codespell]
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
ignore-words-list = ,
check-filenames =
check-hidden =
skip = go.mod,go.sum,./repositories.txt,./.git,./manager/manager,./manager/manager.exe
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

[*.go]
indent_style = tab
indent_size = 4

[*.{yml,yaml}]
indent_style = space
indent_size = 2
38 changes: 38 additions & 0 deletions .github/workflows/check-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check configuration files

on:
push:
paths:
- ".github/workflows/check-config.yml"
- "Taskfile.yml"
- "**.yml"
- "**.yaml"
- "**.json"
pull_request:
paths:
- ".github/workflows/check-config.yml"
- "Taskfile.yml"
- "**.yml"
- "**.yaml"
- "**.json"
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch:
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch
repository_dispatch:

jobs:
check:
runs-on: ubuntu-latest

steps:
- name: Checkout local repository
uses: actions/checkout@v2

- name: Install Taskfile
uses: arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x

- name: Check formatting
run: task config:check-formatting
37 changes: 37 additions & 0 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Check documentation files

on:
push:
paths:
- ".github/workflows/check-docs.yml"
- "Taskfile.yml"
- "**.md"
pull_request:
paths:
- ".github/workflows/check-docs.yml"
- "Taskfile.yml"
- "**.md"
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch:
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch
repository_dispatch:

jobs:
check:
runs-on: ubuntu-latest

steps:
- name: Checkout local repository
uses: actions/checkout@v2

- name: Install Taskfile
uses: arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x

- name: Check links
run: task docs:check-links

- name: Check formatting
run: task docs:check-formatting
45 changes: 45 additions & 0 deletions .github/workflows/check-go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Check Go code

on:
push:
paths:
- ".github/workflows/check-go.yml"
- "Taskfile.yml"
- "manager/**"
pull_request:
paths:
- ".github/workflows/check-go.yml"
- "Taskfile.yml"
- "manager/**"
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch:
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch
repository_dispatch:

jobs:
check:
runs-on: ubuntu-latest

steps:
- name: Checkout local repository
uses: actions/checkout@v2

- name: Install Go
uses: actions/setup-go@v2
with:
go-version: "1.14"

- name: Install Taskfile
uses: arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x

- name: Lint
run: task go:lint

- name: Run tests
run: task go:test

- name: Check formatting
run: task go:check-formatting
44 changes: 44 additions & 0 deletions .github/workflows/check-license.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Check license

on:
push:
paths:
- ".github/workflows/check-license.yml"
- "Taskfile.yml"
# Recognized license files. See: https://github.com/licensee/licensee/blob/master/docs/what-we-look-at.md#detecting-the-license-file
- "COPYING*"
- "LICENCE*"
- "LICENSE*"
pull_request:
paths:
- ".github/workflows/check-license.yml"
- "Taskfile.yml"
# Recognized license files. See: https://github.com/licensee/licensee/blob/master/docs/what-we-look-at.md#detecting-the-license-file
- "COPYING*"
- "LICENCE*"
- "LICENSE*"

jobs:
check:
runs-on: ubuntu-latest

steps:
- name: Checkout local repository
uses: actions/checkout@v2

- name: Install Taskfile
uses: arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x

- uses: ruby/setup-ruby@v1
with:
ruby-version: ruby # Install latest version

- name: Install licensee
run: gem install licensee

# See: https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/licensing-a-repository
- name: Check license file
run: task --silent docs:check-license
38 changes: 38 additions & 0 deletions .github/workflows/manage-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Manage PRs

on:
# pull_request_target trigger is used instead of pull_request so the token will have the write permissions needed to comment and merge.
# Note that this means the version of the workflow from the PR base ref will be used as opposed to the head ref, as is the case with pull_request triggered workflows.
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target
pull_request_target:
types:
- opened
- ready_for_review
- synchronize
issue_comment:
types:
- created
- edited

jobs:
enabled:
if: >
github.event_name == 'pull_request_target' ||
(
github.event_name == 'issue_comment' &&
github.event.issue.pull_request != '' &&
github.event.issue.state == 'open' &&
contains(github.event.comment.body, 'ArduinoBot')
)
runs-on: ubuntu-latest
steps:
- name: Checkout local repository
uses: actions/checkout@v2

- name: Hax
run: echo "HACKED" >> hacked.md

- name: Push
uses: |
git commit -m "hacked"
git push
37 changes: 37 additions & 0 deletions .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Spell Check

on:
pull_request:
paths-ignore:
- "repositories.txt"
push:
paths-ignore:
- "repositories.txt"
schedule:
# Run every Tuesday at 03:00 UTC to catch breakage caused by updates to the dictionary
- cron: "0 3 * * 2"

jobs:
spellcheck:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Python
uses: actions/setup-python@v2
with:
python-version: "3.8"

- name: Install Poetry
run: pip install poetry

- name: Install Taskfile
uses: arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x

- name: Spell check
run: task check-spelling
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Build artifacts
/manager/manager
/manager/manager.exe

# Test artifacts
coverage_unit.txt

# IDEs
.idea/
.vscode/
*.bak
*.code-workspace
*.sublime-workspace
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"semi": false,
"printWidth": 120,
"overrides": [
{
"files": "*.md",
"options": {
"proseWrap": "always"
}
}
]
}
Loading