Skip to content

Commit

Permalink
🧪added tests to repo and fiddled with the workflows files
Browse files Browse the repository at this point in the history
  • Loading branch information
Plebbaroni committed Nov 12, 2024
1 parent 984a176 commit ab00ff6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
9 changes: 5 additions & 4 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
name: 'Build'
description: 'Sets up the repository'
name: "Build"
description: "Sets up the repository"
runs:
using: 'composite'
using: "composite"
steps:
- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: latest
run_install: |
- cwd: './backend'
- name: Install Node.js
uses: actions/setup-node@v3
- name: Install dependencies
shell: bash
working-directory: ./backend
run: pnpm install

11 changes: 7 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
name: Tests
on:
workflow_dispatch:
push:
push:
branches:
- main
- feature/login
paths:
- './backend/**'
- "backend/**"
pull_request:
branches:
- main
- feature/login
paths:
- './backend/**'
- "backend/**"
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432
NODE_ENV: test
jobs:
integration-tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/build
- uses: ./.github/actions/docker-compose
- name: Run tests
run: pnpm run ./backend/test:int
run: pnpm run ./backend/test:int

0 comments on commit ab00ff6

Please sign in to comment.