diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d0d3424..8e0e61e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,14 +20,19 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} + - name: Build the app - run: npm ci | - cp .env.example .env | + run: | + npm ci + cp .env.example .env npm run build + - name: Start the application run: npm run start & + - name: Wait for the server to start run: sleep 5 + - name: Test API endpoint run: | response=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/docs)