From eeb78957afc46fca0fa1a83b77dad2da646f0e54 Mon Sep 17 00:00:00 2001 From: Patrick Devaney Date: Thu, 2 Jan 2025 02:05:27 -0500 Subject: [PATCH] add docker run command to docker-test.yml --- .github/workflows/docker-test.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index a5ca28cd..8445d713 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -1,4 +1,4 @@ -name: Docker Build and Run +name: Docker Build and Test on: push: @@ -9,19 +9,19 @@ on: - main jobs: - docker: + test: runs-on: ubuntu-latest steps: - # Checkout the code + # Checkout the repository - name: Checkout repository uses: actions/checkout@v2 - # Set up Docker Buildx (for multi-platform support, optional) + # 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 + # Cache Docker layers to speed up builds (optional) - name: Cache Docker layers uses: actions/cache@v2 with: @@ -30,17 +30,17 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- - # Build the Docker image from the ./tests directory + # Build Docker image from the ./tests directory - name: Build Docker image run: | docker build -t test-runner:swarm-testing ./tests - # Create a logs directory and pass the OpenAI API Key securely + # Ensure logs directory exists in the GitHub workspace - name: Ensure logs directory exists run: | mkdir -p ${{ github.workspace }}/logs - # Run Docker container and pass OpenAI API Key securely - - name: Run Docker container + # Run Docker container with OpenAI API Key securely + - name: Run Docker container with OpenAI API Key run: | docker run -e OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} -v ${{ github.workspace }}/logs:/usr/src/app/logs test-runner:swarm-testing