Skip to content
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

WIP: Add GitHub Actions #20

Draft
wants to merge 1 commit into
base: dev/translate-jp
Choose a base branch
from
Draft
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
34 changes: 34 additions & 0 deletions .github/workflows/textlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: textlint
on:
push:
branches:
- dev/translate-jp
pull_request:
branches:
- dev/translate-jp
jobs:
textlint:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Run textlint
run: cd textlint && npm install && npm run textlint:ci
- name: Upload lint results artifact
uses: actions/upload-artifact@v2
with:
name: textlint-results
path: textlint/results.xml
- name: Comment lint results on PR
if: ${{ github.event_name == 'pull_request' }}
uses: ScaCap/action-surefire-report@v1
with:
report_paths: 'textlint/results.xml'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion textlint/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
results.xml
3 changes: 2 additions & 1 deletion textlint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"textlint": "textlint --rulesdir=. --ignore-path=\"./.textlintignore\" \"../**/*.md\" "
"textlint": "textlint --rulesdir=. --ignore-path=\"./.textlintignore\" \"../**/*.md\" ",
"textlint:ci": "textlint --format=junit --output-file=./results.xml --rulesdir=. --ignore-path=\"./.textlintignore\" \"../**/*.md\" "
},
"keywords": [],
"author": "Shinya Ishikawa <ishikawa.s.1027@gmail.com> (https://meganetaaan.github.io/)",
Expand Down
Loading