Feature/add seed data #29
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: Code Checks | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
lint-and-format: | |
name: Run Prettier and ESLint | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
contents: read | |
steps: | |
# Step 1: Check out the repository code | |
- name: Check out code | |
uses: actions/checkout@v4 | |
# Step 2: Set up Node.js | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" # You can specify your preferred Node.js version | |
# Step 3: Install pnpm | |
- name: Install pnpm | |
run: npm install -g pnpm | |
# Step 4: Install dependencies | |
- name: Install dependencies | |
run: pnpm install | |
# Step 5: Run Prettier with reviewdog | |
- name: Check Prettier | |
uses: EPMatt/reviewdog-action-prettier@v1 | |
with: | |
workdir: apps | |
filter_mode: file | |
fail_on_error: false | |
reporter: github-pr-review | |
level: warning | |
# Step 6: Run ESLint with reviewdog | |
- name: Run ESLint with reviewdog | |
uses: reviewdog/action-eslint@v1 | |
with: | |
workdir: apps/web | |
filter_mode: nofilter | |
level: error | |
reporter: github-pr-review | |
eslint_flags: "." | |
unit-tests: | |
name: Run Unit Tests for API | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Install dependencies | |
working-directory: . | |
run: pnpm install --filter ./apps/api | |
- name: Run Unit Tests | |
env: | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
AWS_S3_REGION: ${{ secrets.AWS_S3_REGION }} | |
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
AWS_S3_ACCESS_KEY: ${{ secrets.AWS_S3_ACCESS_KEY }} | |
AWS_S3_SECRET_KEY: ${{ secrets.AWS_S3_SECRET_KEY }} | |
working-directory: apps/api | |
run: pnpm test |