Skip to content

Commit 4ef2948

Browse files
authored
Merge pull request #1 from per1234/development
Create a GitHub Actions action for Arduino's firmware unit testing procedure
2 parents 20b5204 + 0022df1 commit 4ef2948

File tree

6 files changed

+920
-0
lines changed

6 files changed

+920
-0
lines changed

.github/workflows/spell-check.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Spell Check
2+
3+
on:
4+
pull_request:
5+
push:
6+
schedule:
7+
# run every Tuesday at 3 AM UTC
8+
- cron: "0 3 * * 2"
9+
10+
jobs:
11+
spellcheck:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
# See: https://github.com/codespell-project/actions-codespell/blob/master/README.md
19+
- name: Spell check
20+
uses: codespell-project/actions-codespell@master
21+
with:
22+
check_filenames: true
23+
check_hidden: true
24+
# In the event of a false positive, add the word in all lower case to this file:
25+
ignore_words_file: etc/codespell-ignore-words-list.txt
+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Validate action.yml
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/validate-action_yml.yml"
7+
- "action.yml"
8+
push:
9+
paths:
10+
- ".github/workflows/validate-action_yml.yml"
11+
- "action.yml"
12+
# Scheduled trigger to catch workflow failure resulting from changes to the JSON schema
13+
schedule:
14+
# run every Tuesday at 3 AM UTC
15+
- cron: "0 3 * * 2"
16+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch
17+
workflow_dispatch:
18+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch
19+
repository_dispatch:
20+
21+
jobs:
22+
spellcheck:
23+
runs-on: ubuntu-latest
24+
25+
env:
26+
JSON_SCHEMA_FOLDER: etc/json-schema
27+
JSON_SCHEMA_FILENAME: github-action.json
28+
29+
steps:
30+
- name: Checkout local repository
31+
uses: actions/checkout@v2
32+
33+
- name: Download JSON schema for action.yml
34+
uses: carlosperate/[email protected]
35+
with:
36+
file-url: https://json.schemastore.org/github-action
37+
location: ${{ env.JSON_SCHEMA_FOLDER }}
38+
file-name: ${{ env.JSON_SCHEMA_FILENAME }}
39+
40+
- name: Install JSON schema validator
41+
run: sudo npm install --global ajv-cli
42+
43+
- name: Validate action.yml
44+
run: ajv -s "${{ env.JSON_SCHEMA_FOLDER }}/${{ env.JSON_SCHEMA_FILENAME }}" -d action.yml

0 commit comments

Comments
 (0)