generated from yandex-praktikum/express-mesto-gha
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (52 loc) · 1.49 KB
/
tests-14-sprint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Tests 14 sprint
on:
push:
branches:
- '**'
tags:
- '**'
jobs:
test_config:
runs-on: ubuntu-latest
steps:
- name: Set up GitHub Actions
uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Get testing lib
run: set -eu && git clone --depth 1 https://github.com/Yandex-Practicum/web-autotest-public.git
- name: Copy Makefile
run: cp ./web-autotest-public/Makefile ./Makefile
- name: Installing Dependencies
run: npm i
- name: Run test config
run: make proj14-test-config
test_endpoints:
runs-on: ubuntu-latest
steps:
- name: Set up GitHub Actions
uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.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/Yandex-Practicum/web-autotest-public.git
- name: Copy Makefile
run: cp ./web-autotest-public/Makefile ./Makefile
- name: Installing Dependencies
run: npm i
- name: Run server
run: npm run start &
- name: Installing wait-port
run: npm install -g wait-port
- name: Wait for server to start
run: wait-port -t 30000 localhost:3000
- name: Run test endpoints
run: make proj14-test-endpoints