add toolkit classes - APT-1691 #10
Workflow file for this run
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: Lint and Format Check | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
check: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: "npm" | |
- name: Install dependencies | |
run: npm ci | |
- name: Lint | |
run: npm run lint:check | |
continue-on-error: false | |
- name: Format Check | |
id: format_check | |
run: | | |
npm run format | |
if [[ $(git status --porcelain | wc -l) -gt 0 ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT # Use environment file | |
echo "::error file=:: Files were formatted. Please commit the changes." | |
exit 1 | |
else | |
echo "changed=false" >> $GITHUB_OUTPUT # Use environment file | |
fi |