Bump npm dependencies in client and server directories (#219) #416
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: Check Lint, Format, and Tests | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| lint-format-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: '22' | |
| - name: Check server | |
| run: | | |
| cd server | |
| npm install | |
| npm run lint | |
| npm run format -- --check | |
| npm run build | |
| npm test | |
| - name: Check client | |
| run: | | |
| cd client | |
| npm install | |
| npm run lint | |
| npm run format -- --check | |
| npm run build | |
| npm test | |
| - name: Check if the code is formatted and linted | |
| run: | | |
| git diff --exit-code -- . ':(exclude)server/package-lock.json' ':(exclude)client/package-lock.json' | |
| if [ $? -eq 0 ]; then | |
| echo "Code is formatted and linted" | |
| else | |
| echo "Code is not formatted or linted" | |
| exit 1 | |
| fi |