-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4df5317
commit 4109840
Showing
8 changed files
with
169 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check: | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
script: [format] | ||
|
||
name: Code check | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
|
||
- name: Setup Node.js (via .nvmrc) | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: "pnpm" | ||
|
||
- name: Install Dependencies | ||
shell: bash | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run ${{ matrix.script }} | ||
run: pnpm run ${{ matrix.script }} | ||
|
||
ci-ok: | ||
name: CI OK | ||
runs-on: ubuntu-latest | ||
if: always() | ||
needs: [check] | ||
env: | ||
FAILURE: ${{ contains(join(needs.*.result, ','), 'failure') }} | ||
CANCELLED: ${{ contains(join(needs.*.result, ','), 'cancelled') }} | ||
steps: | ||
- name: Check for failure or cancelled jobs result | ||
shell: bash | ||
run: | | ||
echo "Failure: $FAILURE - Cancelled: $CANCELLED" | ||
if [ "$FAILURE" = "false" ] && [ "$CANCELLED" = "false" ]; then | ||
exit 0 | ||
else | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Spell Checker | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
|
||
jobs: | ||
spell_checking: | ||
name: LanguageTool | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
checks: write | ||
contents: read | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
# Keep this value in order to show the error comments | ||
# also on edited files. | ||
fetch-depth: 2 | ||
|
||
# If the workflow is triggered by a push use check reporter | ||
# | ||
# If the workflow is triggered by a PR coming from the | ||
# same repository, the author has write access so we can | ||
# use pr-review reporter since the GITHUB_TOKEN will have review | ||
# write permissions | ||
# | ||
# Otherwise use annotation reporter that do not require any | ||
# particular permission | ||
# | ||
# Why this? | ||
# https://github.com/Valerioageno/tuono/pull/137#pullrequestreview-2455455272 | ||
- name: Set reporter | ||
id: reporter | ||
env: | ||
EVENT_NAME: ${{ github.event_name }} | ||
FROM_MAIN_REPO: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }} | ||
run: | | ||
echo "EVENT_NAME: $EVENT_NAME FROM_MAIN_REPO: $FROM_MAIN_REPO" | ||
if [ "$EVENT_NAME" == 'push' ]; then | ||
echo "name=github-check" >> $GITHUB_OUTPUT | ||
elif [ "$FROM_MAIN_REPO" == 'true' ]; then | ||
echo "name=github-pr-review" >> $GITHUB_OUTPUT | ||
else | ||
echo "name=github-pr-annotations" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Review dog languagetool | ||
uses: reviewdog/action-languagetool@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review]. | ||
reporter: ${{ steps.reporter.outputs.name }} | ||
# Change reporter level if you need. | ||
level: "warning" | ||
patterns: "**/*.md **/*.txt **/*.mdx" | ||
# enabled_categories: "STYLE,PLAIN_ENGLISH,WHITESPACE_RULE,EN_QUOTES,DASH_RULE,WORD_CONTAINS_UNDERSCORE,UPPERCASE_SENTENCE_START,ARROWS,COMMA_PARENTHESIS_WHITESPACE,UNLIKELY_OPENING_PUNCTUATION,SENTENCE_WHITESPACE,EN_UNPAIRED_BRACKETS,PHRASE_REPETITION,PUNCTUATION_PARAGRAPH_END" | ||
disabled_categories: "" | ||
disabled_rules: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
22.11.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pnpm-lock.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "tuono-org-github", | ||
"version": "1.0.0", | ||
"private": true, | ||
"description": "", | ||
"keywords": [], | ||
"license": "MIT", | ||
"packageManager": "[email protected]+sha512.6e2baf77d06b9362294152c851c4f278ede37ab1eba3a55fda317a4a17b209f4dbb973fb250a77abc463a341fcb1f17f17cfa24091c4eb319cda0d9b84278387", | ||
"scripts": { | ||
"format": "prettier . --check", | ||
"format:fix": "prettier . --write" | ||
}, | ||
"dependencies": { | ||
"prettier": "3.3.3" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.