Skip to content

Commit

Permalink
Updated actions versions
Browse files Browse the repository at this point in the history
  • Loading branch information
kengres committed Feb 7, 2024
1 parent 66ed957 commit b6c2b95
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 53 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/tests-12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
sprint: ${{ steps.sprint.outputs.SPRINT_NUMBER }}
steps:
- name: Set up GitHub Actions
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Check if sprint file exist
run: bash .github/bin/check-sprint.sh
- name: Get sprint number
Expand All @@ -27,11 +27,11 @@ jobs:
if: ${{ needs.read_sprint_file.outputs.sprint == '12' }}
steps:
- name: Set up GitHub Actions
uses: actions/checkout@v2
- name: Use Node.js 18.x
uses: actions/setup-node@v1
uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
- name: Get testing lib
run: set -eu && git clone --depth 1 https://github.com/practicum-com/tests-12-public.git
- name: Installing Dependencies
Expand All @@ -45,11 +45,11 @@ jobs:
if: ${{ needs.read_sprint_file.outputs.sprint == '12' }}
steps:
- name: Set up GitHub Actions
uses: actions/checkout@v2
- name: Use Node.js 18.x
uses: actions/setup-node@v1
uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
- name: Start MongoDB
uses: supercharge/[email protected]
with:
Expand Down
87 changes: 43 additions & 44 deletions .github/workflows/tests-13.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,67 +3,66 @@ 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 }}"
- name: Set up GitHub Actions
uses: actions/checkout@v4
- 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
- name: Set up GitHub Actions
uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.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
- name: Set up GitHub Actions
uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.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

0 comments on commit b6c2b95

Please sign in to comment.