Skip to content

Commit

Permalink
Add GitHub Actions yml file for validating PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronbrethorst committed Feb 19, 2024
1 parent 1f38674 commit e71bf29
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Validate Pull Request

on:
pull_request:
branches:
- main
- master

jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Docker Compose
uses: docker/setup-buildx-action@v1

- name: Docker Compose up oba_bundler
run: docker-compose up oba_bundler

- name: Docker Compose up oba_app
run: |
docker-compose up oba_app
sleep 30
- name: Validate script execution
run: |
success=false
for i in {1..10}; do
if ./bin/validate.sh; then
echo "Validation succeeded on attempt $i"
success=true
break
else
echo "Validation failed on attempt $i, retrying in 10 seconds..."
sleep 10
fi
done
if [ "$success" = false ]; then
echo "Validation failed after 10 attempts"
exit 1
fi
shell: bash

0 comments on commit e71bf29

Please sign in to comment.