Skip to content

Commit

Permalink
feat: run test server before test pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
jesantos committed Feb 26, 2024
1 parent fc397fb commit 00cd654
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/api_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Install server dependencies
run: |
cd test_server
npm install
- name: Start test server
run: |
cd test_server
nohup npm start &
- name: Run tests
run: npm test
10 changes: 7 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ stages:

api_test:
stage: test
image: node:14
script:
image: node:18
before_script:
- cd test_server
- npm install
- npm test
- nohup npm start &
script:
- cd ../
- npm run test
only:
- main

0 comments on commit 00cd654

Please sign in to comment.