fix: load environment variables in database connection test #22
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: Backend CI | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'backend/**' | |
| - '.github/workflows/backend-ci.yml' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'backend/**' | |
| workflow_dispatch: | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./backend | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| # Remove cache configuration for now | |
| - name: Install dependencies | |
| run: npm install # Using install instead of ci | |
| # Continue with other steps as before | |
| - name: Fix linting issues | |
| run: npm run lint:fix | |
| - name: Lint code | |
| run: npm run lint | |
| - name: Generate Prisma client | |
| run: npm run prisma:generate | |
| - name: Run tests | |
| run: npm test | |
| - name: Build | |
| run: npm run build |