Skip to content

Commit d78447e

Browse files
authored
Merge pull request #1 from arduino/umbynos/implementation
Add first implementation of a serial monitor
2 parents c064e46 + 47ba3f6 commit d78447e

27 files changed

+3111
-1
lines changed

.codespellrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check/.codespellrc
2+
# See: https://github.com/codespell-project/codespell#using-a-config-file
3+
[codespell]
4+
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
5+
ignore-words-list = ,
6+
builtin = clear,informal,en-GB_to_en-US
7+
check-filenames =
8+
check-hidden =
9+
skip = ./.git,./go.mod,./go.sum,./package-lock.json,./poetry.lock,./yarn.lock

.github/workflows/check-go-task.yml

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-go-task.md
2+
name: Check Go
3+
4+
env:
5+
# See: https://github.com/actions/setup-go/tree/v2#readme
6+
GO_VERSION: "1.16"
7+
8+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
9+
on:
10+
push:
11+
paths:
12+
- ".github/workflows/check-go-task.ya?ml"
13+
- "Taskfile.ya?ml"
14+
- "go.mod"
15+
- "go.sum"
16+
- "**.go"
17+
pull_request:
18+
paths:
19+
- ".github/workflows/check-go-task.ya?ml"
20+
- "Taskfile.ya?ml"
21+
- "go.mod"
22+
- "go.sum"
23+
- "**.go"
24+
workflow_dispatch:
25+
repository_dispatch:
26+
27+
jobs:
28+
check-errors:
29+
runs-on: ubuntu-latest
30+
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v2
34+
35+
- name: Install Go
36+
uses: actions/setup-go@v2
37+
with:
38+
go-version: ${{ env.GO_VERSION }}
39+
40+
- name: Install Task
41+
uses: arduino/setup-task@v1
42+
with:
43+
repo-token: ${{ secrets.GITHUB_TOKEN }}
44+
version: 3.x
45+
46+
- name: Check for errors
47+
run: task go:vet
48+
49+
check-outdated:
50+
runs-on: ubuntu-latest
51+
52+
steps:
53+
- name: Checkout repository
54+
uses: actions/checkout@v2
55+
56+
- name: Install Go
57+
uses: actions/setup-go@v2
58+
with:
59+
go-version: ${{ env.GO_VERSION }}
60+
61+
- name: Install Task
62+
uses: arduino/setup-task@v1
63+
with:
64+
repo-token: ${{ secrets.GITHUB_TOKEN }}
65+
version: 3.x
66+
67+
- name: Modernize usages of outdated APIs
68+
run: task go:fix
69+
70+
- name: Check if any fixes were needed
71+
run: git diff --color --exit-code
72+
73+
check-style:
74+
runs-on: ubuntu-latest
75+
76+
steps:
77+
- name: Checkout repository
78+
uses: actions/checkout@v2
79+
80+
- name: Install Go
81+
uses: actions/setup-go@v2
82+
with:
83+
go-version: ${{ env.GO_VERSION }}
84+
85+
- name: Install Task
86+
uses: arduino/setup-task@v1
87+
with:
88+
repo-token: ${{ secrets.GITHUB_TOKEN }}
89+
version: 3.x
90+
91+
- name: Install golint
92+
run: go install golang.org/x/lint/golint@latest
93+
94+
- name: Check style
95+
run: task --silent go:lint
96+
97+
check-formatting:
98+
runs-on: ubuntu-latest
99+
100+
steps:
101+
- name: Checkout repository
102+
uses: actions/checkout@v2
103+
104+
- name: Install Go
105+
uses: actions/setup-go@v2
106+
with:
107+
go-version: ${{ env.GO_VERSION }}
108+
109+
- name: Install Task
110+
uses: arduino/setup-task@v1
111+
with:
112+
repo-token: ${{ secrets.GITHUB_TOKEN }}
113+
version: 3.x
114+
115+
- name: Format code
116+
run: task go:format
117+
118+
- name: Check formatting
119+
run: git diff --color --exit-code
120+
121+
check-config:
122+
name: check-config (${{ matrix.module.path }})
123+
runs-on: ubuntu-latest
124+
125+
strategy:
126+
fail-fast: false
127+
128+
matrix:
129+
module:
130+
# TODO: add paths of all Go modules here
131+
- path: ./
132+
133+
steps:
134+
- name: Checkout repository
135+
uses: actions/checkout@v2
136+
137+
- name: Install Go
138+
uses: actions/setup-go@v2
139+
with:
140+
go-version: ${{ env.GO_VERSION }}
141+
142+
- name: Run go mod tidy
143+
working-directory: ${{ matrix.module.path }}
144+
run: go mod tidy
145+
146+
- name: Check whether any tidying was needed
147+
run: git diff --color --exit-code

.github/workflows/check-license.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-license.md
2+
name: Check License
3+
4+
env:
5+
# TODO: Define the project's license file name here:
6+
EXPECTED_LICENSE_FILENAME: LICENSE.txt
7+
# SPDX identifier: https://spdx.org/licenses/
8+
# TODO: Define the project's license type here
9+
EXPECTED_LICENSE_TYPE: GPL-3.0
10+
11+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
12+
on:
13+
push:
14+
paths:
15+
- ".github/workflows/check-license.ya?ml"
16+
# See: https://github.com/licensee/licensee/blob/master/docs/what-we-look-at.md#detecting-the-license-file
17+
- "[cC][oO][pP][yY][iI][nN][gG]*"
18+
- "[cC][oO][pP][yY][rR][iI][gG][hH][tH]*"
19+
- "[lL][iI][cC][eE][nN][cCsS][eE]*"
20+
- "[oO][fF][lL]*"
21+
- "[pP][aA][tT][eE][nN][tT][sS]*"
22+
pull_request:
23+
paths:
24+
- ".github/workflows/check-license.ya?ml"
25+
- "[cC][oO][pP][yY][iI][nN][gG]*"
26+
- "[cC][oO][pP][yY][rR][iI][gG][hH][tH]*"
27+
- "[lL][iI][cC][eE][nN][cCsS][eE]*"
28+
- "[oO][fF][lL]*"
29+
- "[pP][aA][tT][eE][nN][tT][sS]*"
30+
workflow_dispatch:
31+
repository_dispatch:
32+
33+
jobs:
34+
check-license:
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
- name: Checkout repository
39+
uses: actions/checkout@v2
40+
41+
- name: Install Ruby
42+
uses: ruby/setup-ruby@v1
43+
with:
44+
ruby-version: ruby # Install latest version
45+
46+
- name: Install licensee
47+
run: gem install licensee
48+
49+
- name: Check license file
50+
run: |
51+
EXIT_STATUS=0
52+
# See: https://github.com/licensee/licensee
53+
LICENSEE_OUTPUT="$(licensee detect --json --confidence=100)"
54+
DETECTED_LICENSE_FILE="$(echo "$LICENSEE_OUTPUT" | jq .matched_files[0].filename | tr --delete '\r')"
55+
echo "Detected license file: $DETECTED_LICENSE_FILE"
56+
if [ "$DETECTED_LICENSE_FILE" != "\"${EXPECTED_LICENSE_FILENAME}\"" ]; then
57+
echo "::error file=${DETECTED_LICENSE_FILE}::detected license file $DETECTED_LICENSE_FILE doesn't match expected: $EXPECTED_LICENSE_FILENAME"
58+
EXIT_STATUS=1
59+
fi
60+
DETECTED_LICENSE_TYPE="$(echo "$LICENSEE_OUTPUT" | jq .matched_files[0].matched_license | tr --delete '\r')"
61+
echo "Detected license type: $DETECTED_LICENSE_TYPE"
62+
if [ "$DETECTED_LICENSE_TYPE" != "\"${EXPECTED_LICENSE_TYPE}\"" ]; then
63+
echo "::error file=${DETECTED_LICENSE_FILE}::detected license type $DETECTED_LICENSE_TYPE doesn't match expected \"${EXPECTED_LICENSE_TYPE}\""
64+
EXIT_STATUS=1
65+
fi
66+
exit $EXIT_STATUS
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-markdown-task.md
2+
name: Check Markdown
3+
4+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
5+
on:
6+
push:
7+
paths:
8+
- ".github/workflows/check-markdown-task.ya?ml"
9+
- ".markdown-link-check.json"
10+
- "Taskfile.ya?ml"
11+
- "**/.markdownlint*"
12+
- "**.mdx?"
13+
- "**.mkdn"
14+
- "**.mdown"
15+
- "**.markdown"
16+
pull_request:
17+
paths:
18+
- ".github/workflows/check-markdown-task.ya?ml"
19+
- ".markdown-link-check.json"
20+
- "Taskfile.ya?ml"
21+
- "**/.markdownlint*"
22+
- "**.mdx?"
23+
- "**.mkdn"
24+
- "**.mdown"
25+
- "**.markdown"
26+
schedule:
27+
# Run every Tuesday at 8 AM UTC to catch breakage caused by external changes.
28+
- cron: "0 8 * * TUE"
29+
workflow_dispatch:
30+
repository_dispatch:
31+
32+
jobs:
33+
lint:
34+
runs-on: ubuntu-latest
35+
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v2
39+
40+
- name: Initialize markdownlint-cli problem matcher
41+
uses: xt0rted/markdownlint-problem-matcher@v1
42+
43+
- name: Install Task
44+
uses: arduino/setup-task@v1
45+
with:
46+
repo-token: ${{ secrets.GITHUB_TOKEN }}
47+
version: 3.x
48+
49+
- name: Lint
50+
run: task markdown:lint
51+
52+
links:
53+
runs-on: ubuntu-latest
54+
55+
steps:
56+
- name: Checkout repository
57+
uses: actions/checkout@v2
58+
59+
- name: Install Task
60+
uses: arduino/setup-task@v1
61+
with:
62+
repo-token: ${{ secrets.GITHUB_TOKEN }}
63+
version: 3.x
64+
65+
- name: Check links
66+
run: task --silent markdown:check-links

0 commit comments

Comments
 (0)