-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (34 loc) · 1.04 KB
/
build-test.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
name: Pull Request Tests
on:
pull_request_target:
branches:
- master
jobs:
build:
name: Docker build test
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: build
run: docker compose -p test_codebattles build
api-test:
name: API (Newman) test
runs-on: self-hosted
needs: [build]
steps:
- uses: actions/checkout@v1
- name: Docker down
run: docker compose -p test_codebattles -f test-docker-compose.yml down
- name: Docker up
run: docker compose -p test_codebattles -f test-docker-compose.yml up -d
- name: Sleep for 30 seconds
uses: jakejarvis/wait-action@master
with:
time: '30s'
- uses: matt-ball/newman-action@master
with:
collection: tests/autotests.json
environment: tests/local_env.json
- name: Docker down
if: always()
run: docker compose -p test_codebattles -f test-docker-compose.yml down