Skip to content

Commit e74f116

Browse files
committed
merge single commands into proxy test step
1 parent 8d6bbd2 commit e74f116

1 file changed

Lines changed: 12 additions & 27 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,39 +11,24 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313

14-
- name: Prepare env
15-
run: make prepare-env
16-
17-
- name: Prepare SSH identity (dummy, for testing tunnel only)
18-
run: make prepare-ssh GIT_USERNAME='ci-bot' GIT_EMAIL='ci@example.com'
19-
20-
- name: Build images
21-
run: make build
22-
23-
- name: Start stack
24-
run: make up
25-
26-
- name: Wait for proxy to accept connections
14+
- name: Test proxy
2715
run: |
16+
make prepare-env
17+
make prepare-ssh GIT_USERNAME='ci-bot' GIT_EMAIL='ci@example.com'
18+
make build
19+
make up
2820
for i in $(seq 1 30); do
2921
if docker compose exec -T workspace \
3022
curl -s -o /dev/null -x http://proxy:3128 https://github.com; then
3123
echo "proxy ready after ${i}s"
32-
exit 0
24+
break
25+
fi
26+
if [ "$i" -eq 30 ]; then
27+
echo "proxy did not become ready in 30s" >&2
28+
docker compose logs proxy
29+
exit 1
3330
fi
3431
sleep 1
3532
done
36-
echo "proxy did not become ready in 30s" >&2
37-
docker compose logs proxy
38-
exit 1
39-
40-
- name: Run proxy rule tests
41-
run: make test
42-
43-
- name: Proxy logs on failure
44-
if: failure()
45-
run: docker compose logs proxy
33+
make test
4634
47-
- name: Tear down
48-
if: always()
49-
run: make down

0 commit comments

Comments
 (0)