Skip to content

Huilensolis is testing out fix ci #152

Huilensolis is testing out fix ci

Huilensolis is testing out fix ci #152

Workflow file for this run

name: Run Api Tests
run-name: ${{ github.actor }} is testing out ${{ github.event.pull_request.title }}
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: apps/api
environment: Preview
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest # or "latest", "canary", <sha>
- uses: KengoTODA/actions-setup-docker-compose@v1
with:
version: "v2.24.1" # the full version of `docker-compose` command
- name: Install npm dependencies
run: pwd && bun i
- name: Create .env file
run: |
touch .env
echo PORT=3000 >> .env
echo JWT_SECRET="secret" >> .env
echo POSTGRES_DATABASE="memoir_db" >> .env
echo POSTGRES_USER="memoir_user" >> .env
echo POSTGRES_PASSWORD="memoir_password" >> .env
echo NODE_ENV="test" >> .env
echo ORIGIN="localhost:3001" >> .env
echo API_URL="http://localhost:3000" >> .env
echo DATABASE_URL="empty-string" >> .env
- name: Run set up environment script
run: bun run setup
- name: Run tests
run: bun run test