Skip to content

Commit

Permalink
Split workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
michalspano committed Nov 1, 2023
1 parent 7ffaed1 commit ee1904a
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ name: Express.js, Postman backend - SEManager
on: [push]

jobs:
setup:
test:
runs-on: ubuntu-latest
env:
# URL and port definition for mongodb on the runner
MONGODB_URI: "mongodb:https://localhost:27017/serverTestDB"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
Expand All @@ -14,20 +17,16 @@ jobs:
cache: 'npm'
# Caching in monorepos (server)
cache-dependency-path: server/package-lock.json
- run: |
cd server
npm ci
test:
runs-on: ubuntu-latest
env:
MONGODB_URI: "mongodb:https://localhost:27017/serverTestDB"
steps:
- name: Start MongoDB service
# Using supercharge to setup/start the MongoDB service
uses: supercharge/[email protected]
with:
mongodb-version: 4.4
- run: |
- name: Install dependencies
run: |
cd server
npm ci
- name: Test the backend
run: |
cd server
npm run ci-test

0 comments on commit ee1904a

Please sign in to comment.