fixed ci workflow and badge #3
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout code | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Set up Node.js environment | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
# Install dependencies | |
- name: Install dependencies | |
run: yarn install | |
# Run build | |
- name: Run build | |
run: yarn run build | |
# ESLint check | |
- name: Run ESLint | |
run: yarn run lint | |
# Run spell check | |
- name: Spell Check | |
uses: reviewdog/action-misspell@v1 | |
with: | |
locale: "en" | |
# You can ignore specific directories by adding ignore paths | |
# e.g. ignore: 'node_modules/**/*,dist/**/*' | |
reporter: "github-pr-review" # Leave inline comments on the PR | |
# Run tests (optional, depending on whether you have tests set up) | |
- name: Run tests | |
run: yarn test | |
# Job to ensure linting and spell check pass before merge | |
lint_spell_check: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout code | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Set up Node.js environment | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
# Install dependencies | |
- name: Install dependencies | |
run: yarn install | |
# ESLint check | |
- name: ESLint Check | |
run: yarn run lint | |
# Run spell check | |
- name: Spell Check | |
uses: reviewdog/action-misspell@v1 | |
with: | |
locale: "en" | |
reporter: "github-pr-review" |