Skip to content

Commit d59d0e6

Browse files
Move GUI tests into their own
1 parent d75c7a4 commit d59d0e6

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
@@ -123,6 +123,31 @@ jobs:
123123
$f || exit 1
124124
done
125125
126+
- name: Clean up the database
127+
run: docker-compose down --volumes
128+
129+
GUIs_test:
130+
runs-on: ubuntu-latest
131+
needs: build
132+
steps:
133+
- uses: actions/checkout@v4
134+
135+
- name: get test binaries from cache
136+
uses: actions/download-artifact@v3
137+
with:
138+
name: test-binaries-${{ github.sha }}
139+
path: ./test-binaries/
140+
141+
- name: Launch postgres and min.io
142+
run: |
143+
cp .env.sample .env
144+
mkdir -p ${DOCSRS_PREFIX}/public-html
145+
docker-compose up -d db s3
146+
# Give the database enough time to start up
147+
sleep 5
148+
# Make sure the database is actually working
149+
psql "${DOCSRS_DATABASE_URL}"
150+
126151
- name: Run GUI tests
127152
run: ./dockerfiles/run-gui-tests.sh
128153

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)