Skip to content

Commit

Permalink
#2 Add GH Workflow to test backend via Postman
Browse files Browse the repository at this point in the history
This commit adds a workflow that tests the backend based on the
Postman tests. The workflow is triggered on every push to the
repository. This is, roughly, a transaltion of the GitLab CI
pipeline to GitHub Actions.
  • Loading branch information
michalspano committed Nov 1, 2023
1 parent ad522c1 commit 41680c1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 52 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Express.js, Postman backend - SEManager

# On every push, the Backend shall be tested.
on: [push]

jobs:
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
with:
node-version: 16
cache: 'npm'
# Caching in monorepos (server)
cache-dependency-path: server/package-lock.json
- name: Start MongoDB service
# Using supercharge to setup/start the MongoDB service
uses: supercharge/[email protected]
with:
mongodb-version: 4.4
- name: Install dependencies
run: |
cd server
npm ci
- name: Test the backend
run: |
cd server
npm run ci-test
52 changes: 0 additions & 52 deletions .gitlab-ci.yml

This file was deleted.

0 comments on commit 41680c1

Please sign in to comment.