Skip to content

Commit d53b887

Browse files
Add GitHub Actions yml file for validating PRs
1 parent 1f38674 commit d53b887

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/ci.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Validate Pull Request
2+
3+
on:
4+
pull_request: []
5+
6+
jobs:
7+
validate:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v3
12+
13+
- name: Set up Docker Compose
14+
uses: docker/setup-buildx-action@v1
15+
16+
- name: Docker Compose up oba_bundler
17+
run: docker-compose up oba_bundler
18+
19+
- name: Docker Compose up oba_app
20+
run: |
21+
docker-compose up oba_app
22+
sleep 30
23+
24+
- name: Validate script execution
25+
run: |
26+
success=false
27+
for i in {1..10}; do
28+
if ./bin/validate.sh; then
29+
echo "Validation succeeded on attempt $i"
30+
success=true
31+
break
32+
else
33+
echo "Validation failed on attempt $i, retrying in 10 seconds..."
34+
sleep 10
35+
fi
36+
done
37+
if [ "$success" = false ]; then
38+
echo "Validation failed after 10 attempts"
39+
exit 1
40+
fi
41+
shell: bash

0 commit comments

Comments
 (0)