chore: update GitHub Actions workflows to use latest action versions and improve configurations #1
Workflow file for this run
This file contains hidden or 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: Lint and Format | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| jobs: | |
| lint: | |
| name: Lint and Format Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Check code formatting | |
| run: npm run format:check || npx prettier --check "**/*.{ts,js,json,yml,md}" | |
| continue-on-error: true | |
| - name: Lint code | |
| run: npm run lint || npx eslint "**/*.{ts,js}" |