diff --git a/.github/workflows/backend-system-tests.yml b/.github/workflows/backend-system-tests.yml index f23bdcfe..ad7748df 100644 --- a/.github/workflows/backend-system-tests.yml +++ b/.github/workflows/backend-system-tests.yml @@ -6,16 +6,17 @@ on: - main jobs: - integration-tests: + system-tests: runs-on: ubuntu-latest - container: node:18-alpine + container: node:18 steps: - uses: actions/checkout@v2 - with: - path: backend - name: Install Dependencies + working-directory: ./backend run: npm install - name: Create .env file + working-directory: ./backend run: mv .env.example .env - name: Run Server and Test with Newman + working-directory: ./backend run: npm run test:system diff --git a/backend/package.json b/backend/package.json index 1a3416df..2721a0fb 100644 --- a/backend/package.json +++ b/backend/package.json @@ -7,7 +7,7 @@ "prod": "npx prisma migrate deploy && dotenv node dist/main", "lint": "eslint 'src/**/*.ts'", "format": "prettier --write 'src/**/*.ts'", - "test:system": "npx prisma migrate reset -f && pm2 start 'nest start' && sleep 5 && newman run ./test/system/newman-system-tests.json ; pm2 delete 0" + "test:system": "npx prisma migrate reset -f && nest start & sleep 10 && newman run ./test/system/newman-system-tests.json" }, "dependencies": { "@nestjs/common": "^9.1.2", @@ -52,7 +52,6 @@ "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", "newman": "^5.3.2", - "pm2": "^5.2.2", "prettier": "^2.7.1", "prisma": "^4.4.0", "source-map-support": "^0.5.21",