Skip to content

Run NPM tests using couchbase service container #4

Run NPM tests using couchbase service container

Run NPM tests using couchbase service container #4

name: Run NPM tests using couchbase service container
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: "0 11 * * 0"
env:
DB_ENDPOINT: ${{ secrets.DB_ENDPOINT }}
DB_USERNAME: ${{ secrets.DB_USERNAME }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_BUCKET: ${{ secrets.DB_BUCKET }}
DB_SCOPE: ${{ vars.GITHUB_HEAD_REF }}
ROARR_LOG: true
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: Update repositories
run: |
apt update || echo "apt-update failed" # && apt -y upgrade
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v3
- name: Postman Tests
run: |
npm install
chmod +x ./postman/run-api-tests.sh
npm start &
APIURL="http://127.0.0.1:4000/api" npm run test-api