Tests Project 13: fix: upgrade multiple dependencies with Snyk Snyk has created this PR to upgrade: - jsonwebtoken from 9.0.1 to 9.0.2. See this package in npm: https://www.npmjs.com/package/jsonwebtoken - validator from 13.11.0 to 13.12.0. See this package in npm: https://www.npmjs.com/package/validator - winston from 3.13.0 to 3.14.2. See this package in npm: https://www.npmjs.com/package/winston See this project in Snyk: https://app.snyk.io/org/amay0808/project/2b617d8d-948e-4262-a... #88
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
run-name: "Tests Project 13: ${{ github.event.head_commit.message }}" | |
on: | |
push: | |
branches: | |
- '**' | |
tags: | |
- '**' | |
jobs: | |
read_sprint_file: | |
runs-on: ubuntu-latest | |
outputs: | |
sprint: ${{ steps.sprint.outputs.SPRINT_NUMBER }} | |
steps: | |
- name: Set up GitHub Actions | |
uses: actions/checkout@v2 | |
- name: Check if sprint file exist | |
run: bash .github/bin/check-sprint.sh | |
- name: Get sprint number | |
id: sprint | |
run: echo "SPRINT_NUMBER=$(cat sprint.txt)" >> $GITHUB_OUTPUT | |
- name: Print sprint number | |
run: echo "${{ steps.sprint.outputs.SPRINT_NUMBER }}" | |
test_config: | |
runs-on: ubuntu-latest | |
needs: read_sprint_file | |
if: ${{ needs.read_sprint_file.outputs.sprint == '13' }} | |
steps: | |
- name: Set up GitHub Actions | |
uses: actions/checkout@v2 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18.x | |
- name: Get testing lib | |
run: set -eu && git clone --depth 1 https://github.com/practicum-com/tests-13-public.git | |
- name: Installing Dependencies | |
run: npm i | |
- name: Run test config | |
run: cd tests-13-public && bash ./bin/test-config.sh | |
test_endpoints: | |
runs-on: ubuntu-latest | |
needs: read_sprint_file | |
if: ${{ needs.read_sprint_file.outputs.sprint == '13' }} | |
steps: | |
- name: Set up GitHub Actions | |
uses: actions/checkout@v2 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18.x | |
- name: Start MongoDB | |
uses: supercharge/[email protected] | |
with: | |
mongodb-version: '4.4' | |
- name: Get testing lib | |
run: set -eu && git clone --depth 1 https://github.com/practicum-com/tests-13-public.git | |
- name: Installing Dependencies | |
run: npm i | |
- name: Installing wait-port | |
run: npm install -g wait-port | |
- name: Run server | |
run: npm run start & wait-port -t 30000 localhost:3001 | |
- name: Run test endpoints | |
run: cd tests-13-public && bash ./bin/test-endpoints.sh |