Skip to content

Commit 27b761d

Browse files
GuillaumeGomezsyphar
authored andcommitted
Move GUI tests into their own
1 parent 8849d80 commit 27b761d

File tree

2 files changed

+28
-9
lines changed

2 files changed

+28
-9
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,31 @@ jobs:
127127
$f || exit 1
128128
done
129129
130+
- name: Clean up the database
131+
run: docker-compose down --volumes
132+
133+
GUIs_test:
134+
runs-on: ubuntu-latest
135+
needs: build
136+
steps:
137+
- uses: actions/checkout@v4
138+
139+
- name: get test binaries from cache
140+
uses: actions/download-artifact@v3
141+
with:
142+
name: test-binaries-${{ github.sha }}
143+
path: ./test-binaries/
144+
145+
- name: Launch postgres and min.io
146+
run: |
147+
cp .env.sample .env
148+
mkdir -p ${DOCSRS_PREFIX}/public-html
149+
docker-compose up -d db s3
150+
# Give the database enough time to start up
151+
sleep 5
152+
# Make sure the database is actually working
153+
psql "${DOCSRS_DATABASE_URL}"
154+
130155
- name: Run GUI tests
131156
run: ./dockerfiles/run-gui-tests.sh
132157

dockerfiles/run-gui-tests.sh

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ docker-compose up -d db s3
77

88
# We add the information we need.
99
cargo run -- database migrate
10-
docker-compose run web build crate sysinfo 0.23.4
11-
docker-compose run web build crate sysinfo 0.23.5
12-
docker-compose run web build add-essential-files
13-
docker-compose build web
10+
cargo run -- build crate sysinfo 0.23.4
11+
cargo run -- build crate sysinfo 0.23.5
12+
cargo run -- build add-essential-files
1413

1514
# In case we don't have a `.env`, we create one.
1615
if [ ! -f .env ]
@@ -19,16 +18,11 @@ cp .env.sample .env
1918
. .env
2019
fi
2120

22-
docker-compose up -d web
23-
2421
cargo run -- start-web-server &
2522
SERVER_PID=$!
2623

2724
docker build . -f dockerfiles/Dockerfile-gui-tests -t gui_tests
2825

29-
echo "Sleeping a bit to be sure the web server will be started..."
30-
sleep 5
31-
3226
# status="docker run . -v `pwd`:/build/out:ro gui_tests"
3327
docker-compose run gui_tests
3428
status=$?

0 commit comments

Comments
 (0)