|
|
|
name: Docker Build and Test
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
fix to build and run ci/cd
fix to build and run ci/cd, 2nd attempt
fix to build and run ci/cd, 3rd attempt
fix to build and run ci/cd, 4th attempt
fix to build and run ci/cd, 5th attempt
fix to build and run ci/cd, 6th attempt
fix to build and run ci/cd, 7th attempt
fix to build and run ci/cd, 8th attempt
fix to build and run ci/cd, 9th attempt
fix to build and run ci/cd, 10th attempt
fix to build and run ci/cd, 11th attempt
fix to build and run ci/cd, 12th attempt
fix to build and run ci/cd, 13th attempt
fix to build and run ci/cd, 14th attempt
fix to build and run ci/cd, 15th attempt
commit
commit
1 week ago
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
fix to build and run ci/cd
fix to build and run ci/cd, 2nd attempt
fix to build and run ci/cd, 3rd attempt
fix to build and run ci/cd, 4th attempt
fix to build and run ci/cd, 5th attempt
fix to build and run ci/cd, 6th attempt
fix to build and run ci/cd, 7th attempt
fix to build and run ci/cd, 8th attempt
fix to build and run ci/cd, 9th attempt
fix to build and run ci/cd, 10th attempt
fix to build and run ci/cd, 11th attempt
fix to build and run ci/cd, 12th attempt
fix to build and run ci/cd, 13th attempt
fix to build and run ci/cd, 14th attempt
fix to build and run ci/cd, 15th attempt
commit
commit
1 week ago
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
# Checkout the repository
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
# Set up Docker Buildx (optional, for multi-platform support)
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
|
|
|
|
# Cache Docker layers to speed up builds (optional)
|
|
|
|
- name: Cache Docker layers
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: /tmp/.buildx-cache
|
|
|
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-buildx-
|
|
|
|
|
fix to build and run ci/cd
fix to build and run ci/cd, 2nd attempt
fix to build and run ci/cd, 3rd attempt
fix to build and run ci/cd, 4th attempt
fix to build and run ci/cd, 5th attempt
fix to build and run ci/cd, 6th attempt
fix to build and run ci/cd, 7th attempt
fix to build and run ci/cd, 8th attempt
fix to build and run ci/cd, 9th attempt
fix to build and run ci/cd, 10th attempt
fix to build and run ci/cd, 11th attempt
fix to build and run ci/cd, 12th attempt
fix to build and run ci/cd, 13th attempt
fix to build and run ci/cd, 14th attempt
fix to build and run ci/cd, 15th attempt
commit
commit
1 week ago
|
|
|
# Build Docker image from the root directory
|
|
|
|
- name: Build Docker image
|
fix to build and run ci/cd
fix to build and run ci/cd, 2nd attempt
fix to build and run ci/cd, 3rd attempt
fix to build and run ci/cd, 4th attempt
fix to build and run ci/cd, 5th attempt
fix to build and run ci/cd, 6th attempt
fix to build and run ci/cd, 7th attempt
fix to build and run ci/cd, 8th attempt
fix to build and run ci/cd, 9th attempt
fix to build and run ci/cd, 10th attempt
fix to build and run ci/cd, 11th attempt
fix to build and run ci/cd, 12th attempt
fix to build and run ci/cd, 13th attempt
fix to build and run ci/cd, 14th attempt
fix to build and run ci/cd, 15th attempt
commit
commit
1 week ago
|
|
|
id: build_image
|
|
|
|
run: |
|
fix to build and run ci/cd
fix to build and run ci/cd, 2nd attempt
fix to build and run ci/cd, 3rd attempt
fix to build and run ci/cd, 4th attempt
fix to build and run ci/cd, 5th attempt
fix to build and run ci/cd, 6th attempt
fix to build and run ci/cd, 7th attempt
fix to build and run ci/cd, 8th attempt
fix to build and run ci/cd, 9th attempt
fix to build and run ci/cd, 10th attempt
fix to build and run ci/cd, 11th attempt
fix to build and run ci/cd, 12th attempt
fix to build and run ci/cd, 13th attempt
fix to build and run ci/cd, 14th attempt
fix to build and run ci/cd, 15th attempt
commit
commit
1 week ago
|
|
|
IMAGE_TAG="test-runner:swarm-testing-${GITHUB_SHA}"
|
|
|
|
docker build -t $IMAGE_TAG .
|
|
|
|
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV
|
|
|
|
|
fix to build and run ci/cd
fix to build and run ci/cd, 2nd attempt
fix to build and run ci/cd, 3rd attempt
fix to build and run ci/cd, 4th attempt
fix to build and run ci/cd, 5th attempt
fix to build and run ci/cd, 6th attempt
fix to build and run ci/cd, 7th attempt
fix to build and run ci/cd, 8th attempt
fix to build and run ci/cd, 9th attempt
fix to build and run ci/cd, 10th attempt
fix to build and run ci/cd, 11th attempt
fix to build and run ci/cd, 12th attempt
fix to build and run ci/cd, 13th attempt
fix to build and run ci/cd, 14th attempt
fix to build and run ci/cd, 15th attempt
commit
commit
1 week ago
|
|
|
# Ensure logs directory exists and has correct permissions
|
|
|
|
- name: Ensure logs directory exists
|
|
|
|
run: |
|
|
|
|
mkdir -p ${{ github.workspace }}/logs
|
fix to build and run ci/cd
fix to build and run ci/cd, 2nd attempt
fix to build and run ci/cd, 3rd attempt
fix to build and run ci/cd, 4th attempt
fix to build and run ci/cd, 5th attempt
fix to build and run ci/cd, 6th attempt
fix to build and run ci/cd, 7th attempt
fix to build and run ci/cd, 8th attempt
fix to build and run ci/cd, 9th attempt
fix to build and run ci/cd, 10th attempt
fix to build and run ci/cd, 11th attempt
fix to build and run ci/cd, 12th attempt
fix to build and run ci/cd, 13th attempt
fix to build and run ci/cd, 14th attempt
fix to build and run ci/cd, 15th attempt
commit
commit
1 week ago
|
|
|
chmod -R 777 ${{ github.workspace }}/logs
|
|
|
|
|
|
|
|
# Run Docker container with OpenAI API Key securely and capture test logs
|
|
|
|
- name: Run Docker container with OpenAI API Key
|
|
|
|
run: |
|
fix to build and run ci/cd
fix to build and run ci/cd, 2nd attempt
fix to build and run ci/cd, 3rd attempt
fix to build and run ci/cd, 4th attempt
fix to build and run ci/cd, 5th attempt
fix to build and run ci/cd, 6th attempt
fix to build and run ci/cd, 7th attempt
fix to build and run ci/cd, 8th attempt
fix to build and run ci/cd, 9th attempt
fix to build and run ci/cd, 10th attempt
fix to build and run ci/cd, 11th attempt
fix to build and run ci/cd, 12th attempt
fix to build and run ci/cd, 13th attempt
fix to build and run ci/cd, 14th attempt
fix to build and run ci/cd, 15th attempt
commit
commit
1 week ago
|
|
|
docker run -e OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} \
|
|
|
|
-v ${{ github.workspace }}/logs:/usr/src/app/logs \
|
|
|
|
${{ env.IMAGE_TAG }} \
|
|
|
|
bash -c "pytest /usr/src/app/tests --continue-on-collection-errors --tb=short --disable-warnings | tee /usr/src/app/logs/test_logs.txt"
|
|
|
|
|
|
|
|
# Print the test logs to the console
|
|
|
|
- name: Print test logs
|
|
|
|
run: |
|
|
|
|
cat ${{ github.workspace }}/logs/test_logs.txt || echo "No test logs found"
|