fixing port issue #32
Workflow file for this run
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: Application Tests | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test-utils: | |
name: Utils Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Pnpm setup | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 9 | |
- name: Cache pnpm | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Run Tests | |
run: pnpm t utils | |
test-app: | |
name: App Test | |
runs-on: ubuntu-latest | |
needs: test-utils | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Pnpm setup | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 9 | |
- name: Cache pnpm | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Install Dependencies | |
run: pnpm install | |
- name: PSQL Setup | |
uses: harmon758/postgresql-action@v1 | |
with: | |
postgresql db: test_db | |
postgresql user: test_user | |
postgresql password: test_pw | |
- name: Run Tests | |
run: PGDATABASE=test_db PGUSER=test_user PGPASSWORD=test_pw pnpm t app | |
staging-test: | |
name: Staging Test | |
runs-on: ubuntu-latest | |
needs: test-app | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Pnpm setup | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 9 | |
- name: Cache pnpm | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Run Tests | |
run: NODE_ENV=production DATABASE_URL=${{ secrets.DB_URL }} pnpm t app |