Skip to content

Commit

Permalink
update qa-suite.yml to new syntax for main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
erikspears committed May 17, 2024
1 parent aecffe6 commit 85b56cf
Showing 1 changed file with 40 additions and 25 deletions.
65 changes: 40 additions & 25 deletions .github/workflows/qa-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,56 @@ jobs:

qa-suite:
runs-on: ubuntu-latest

services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Checkout the Code
uses: actions/checkout@v4
- name: Start Application Environment
run: docker-compose up -d
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Wait for Application to be Ready
run: |
echo "Waiting for the application to become ready..."
max_attempts=10
count=0
until curl --output /dev/null --silent --head --fail http://localhost:8000/galaxy/login; do
count=$(($count+1))
if [ $count -ge $max_attempts ]; then
echo "Application did not become ready in time."
exit 1
fi
printf '.'
sleep 30
done
echo "Application is ready."
- name: Create env File
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: '3.12.1'
cache: 'pip'
- name: Install Swirl
run: ./install.sh
- name: Setup Swirl
run: python swirl.py setup
- name: Install the Latest Galaxy UI
run: ./install-ui.sh
env:
MSAL_CB_PORT: 8000
MSAL_HOST: localhost
- name: Start Swirl
run: |
echo "SWIRL_TEST_HOST=localhost" > .env
echo "QA_ADMIN_USER=${{ secrets.QA_ADMIN_USER }}" >> .env
echo "QA_ADMIN_PW=${{ secrets.QA_ADMIN_PW }}" >> .env
echo "OPENAI_API_KEY='${{ secrets.QA_OPENAI_KEY }}'" >> .env
cat .env
python swirl.py start
env:
ALLOWED_HOSTS: localhost,host.docker.internal
- name: Run the QA Suite
run: docker run --net=host --env-file .env -t swirlai/swirl-search-qa:automated-tests-master sh -c "behave --tags=qa_suite,community"
- name: Cleanup Application Environment
run: docker-compose down
run: |
echo "SWIRL_TEST_HOST=localhost" > .env.qa
echo "MSAL_HOST=localhost" >> .env.qa
echo "MSAL_CB_PORT=8000" >> .env.qa
echo "QA_ADMIN_PW=${{ secrets.QA_ADMIN_PW }}" >> .env.qa
echo "QA_OPENAI_KEY=${{ secrets.QA_OPENAI_KEY }}" >> .env.qa
echo "========"
cat .env.qa
echo "========"
docker run --net=host --env-file .env.qa -t swirlai/swirl-search-qa:automated-tests-master sh -c "behave --tags=qa_suite,community"
- name: Upload Log Files
if: always()
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 85b56cf

Please sign in to comment.