Merge pull request #5 from MysteryCode/gh-actions #29
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: Code Style | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| ts: | |
| name: TS Prettier | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: "24" | |
| cache: "npm" | |
| - run: npm install | |
| - name: Run prettier | |
| run: | | |
| shopt -s globstar | |
| npx prettier -w src/**/*.ts | |
| - run: echo "::add-matcher::.github/diff.json" | |
| - name: Show diff | |
| run: | | |
| git checkout -- package-lock.json | |
| git diff --exit-code |