generated from yandex-praktikum/java-shareit
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (47 loc) · 1.56 KB
/
api-tests.yml
File metadata and controls
61 lines (47 loc) · 1.56 KB
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
56
57
58
59
60
61
name: ShareIt API Tests
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout target repo
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Install helper script
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y wget &&
wget --no-check-certificate -P /tmp/ https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh &&
chmod a+x /tmp/wait-for-it.sh
- name: Checkout tests
uses: actions/checkout@v3
with:
repository: 'yandex-praktikum/java-shareit'
ref: ${{ github.event.pull_request.head.ref }}
path: tests
- name: Check and Build application
run: |
chmod a+x ./tests/.github/workflows/build.sh
./tests/.github/workflows/build.sh
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Install newman
run: |
npm install -g newman
- name: Run Application
run: |
chmod a+x ./tests/.github/workflows/run.sh
./tests/.github/workflows/run.sh
- name: Waiting for application is up
run: |
/tmp/wait-for-it.sh -t 60 localhost:8080
echo "Application is up"
- name: Run POSTMAN tests
run: |
newman run ./tests/postman/sprint.json --delay-request 50 -r cli