Skip to content

Create a GitHub Actions action for Arduino's firmware unit testing procedure #1

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

Merged
merged 1 commit into from
Oct 13, 2020
Merged
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
25 changes: 25 additions & 0 deletions .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Spell Check

on:
pull_request:
push:
schedule:
# run every Tuesday at 3 AM UTC
- cron: "0 3 * * 2"

jobs:
spellcheck:
runs-on: ubuntu-latest

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

# See: https://github.com/codespell-project/actions-codespell/blob/master/README.md
- name: Spell check
uses: codespell-project/actions-codespell@master
with:
check_filenames: true
check_hidden: true
# In the event of a false positive, add the word in all lower case to this file:
ignore_words_file: etc/codespell-ignore-words-list.txt
44 changes: 44 additions & 0 deletions .github/workflows/validate-action_yml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Validate action.yml

on:
pull_request:
paths:
- ".github/workflows/validate-action_yml.yml"
- "action.yml"
push:
paths:
- ".github/workflows/validate-action_yml.yml"
- "action.yml"
# Scheduled trigger to catch workflow failure resulting from changes to the JSON schema
schedule:
# run every Tuesday at 3 AM UTC
- cron: "0 3 * * 2"
# 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:
spellcheck:
runs-on: ubuntu-latest

env:
JSON_SCHEMA_FOLDER: etc/json-schema
JSON_SCHEMA_FILENAME: github-action.json

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

- name: Download JSON schema for action.yml
uses: carlosperate/[email protected]
with:
file-url: https://json.schemastore.org/github-action
location: ${{ env.JSON_SCHEMA_FOLDER }}
file-name: ${{ env.JSON_SCHEMA_FILENAME }}

- name: Install JSON schema validator
run: sudo npm install --global ajv-cli

- name: Validate action.yml
run: ajv -s "${{ env.JSON_SCHEMA_FOLDER }}/${{ env.JSON_SCHEMA_FILENAME }}" -d action.yml
Loading