-
Notifications
You must be signed in to change notification settings - Fork 8
35 lines (33 loc) · 1.1 KB
/
e2e.yaml
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
name: With server
on: push
jobs:
cypress-run:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Clean space
run: ./free_disk_space_github.sh
shell: bash
- name: Build docker container
run: docker build -t nolabs -f cpu.conformations.Dockerfile .
- name: Run docker container
run: docker run --name nolabs-docker -d -p 5173:5173 -p 5000:5000 nolabs --test
- name: Wait for the backend
run: |
while true; do \
output=$(docker logs nolabs-docker --since 6s)
echo $output
if echo "$output" | grep -q -- "Running on all addresses (0.0.0.0)"; then
echo "$output"
echo "Stopping action, since flask is running"
break
fi
sleep 3 # Sleep for 1 second before checking again
done
- name: Check curl
run: curl http://localhost:5000/api/amino-acid/experiments
- name: Cypress run
uses: cypress-io/github-action@v5
with:
working-directory: tests