Merge pull request #12 from KINGTUT10101/oppo266-patch-1 #99
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: Run Tests and Lint | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
jobs: | |
#TODO: Make this run on the backend too | |
# This would probably require creating a small DB with some mock data or finding some way to emulate the data | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install Dependencies | |
run: | | |
cd client | |
npm install | |
cd .. | |
npm install | |
- name: Run Tests | |
run: | | |
cd client | |
npm run test | |
- name: Lint files | |
run: npx eslint "client/src/**/*.{js,jsx,ts,tsx}" |