Skip to content

Commit

Permalink
fix test workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
SkidGod4444 committed Nov 11, 2024
1 parent ab996a3 commit f646260
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ jobs:
- name: Install pnpm (again in case the previous job isolated the environment)
run: npm install -g pnpm

- name: Install Turbo CLI
run: npm install -g turbo

- name: Run Lint
run: pnpm lint

Expand All @@ -76,8 +79,5 @@ jobs:
with:
node-version: '21.7.1'

- name: Install pnpm (again in case the previous job isolated the environment)
run: npm install -g pnpm

- name: Run Tests
run: pnpm test
20 changes: 11 additions & 9 deletions .github/workflows/test-multiple-node-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ jobs:
echo "DATABASE_URL=${{ secrets.DATABASE_URL }}" >> apps/api/.env
echo "RESEND_API=${{ secrets.RESEND_API }}" >> apps/api/.env
- name: Set environment variables for vitest in apps/api
run: |
echo "RESEND_API=${{ secrets.RESEND_API }}" >> apps/api/.env
echo "DATABASE_URL=${{ secrets.DATABASE_URL }}" >> apps/api/.env
cat apps/api/.env # Add this line to log and verify env variables
- name: Set up Node.js
uses: actions/setup-node@v2
with:
Expand All @@ -50,14 +56,10 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Log environment variables for verification (debug)
run: |
echo "DATABASE_URL=$DATABASE_URL"
echo "RESEND_API=$RESEND_API"
- name: Run tests
run: pnpm test

# Ensuring environment is correctly set for vitest tests
- name: Set environment variables for vitest in apps/api
run: |
echo "RESEND_API=${{ secrets.RESEND_API }}" >> apps/api/.env
echo "DATABASE_URL=${{ secrets.DATABASE_URL }}" >> apps/api/.env
env:
RESEND_API: ${{ secrets.RESEND_API }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}

0 comments on commit f646260

Please sign in to comment.