diff --git a/.github/workflows/build-context-builder-image.yml b/.github/workflows/build-context-builder-image.yml index 51bb1e3c2..22960009f 100644 --- a/.github/workflows/build-context-builder-image.yml +++ b/.github/workflows/build-context-builder-image.yml @@ -28,24 +28,24 @@ jobs: - uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Docker meta id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v4 with: images: baseten/truss-context-builder - name: Docker Build id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./ file: ./context_builder.Dockerfile diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 24bb8e075..19aa905fa 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -36,10 +36,10 @@ jobs: job_type: ["server"] steps: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -68,22 +68,7 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-python/ - run: poetry install - - run: poetry run pytest truss/tests --durations=0 -m 'integration' --splits 5 --group ${{ matrix.split_group }} -k "not test_requirements_pydantic[1]" - - # Running `test_requirements_pydantic[1]` started failing when running together with the other tests. - # We could pin down the issue to the fact that the built image had v2 installed, despite v1 in `requirements.txt` - # The test passes locally and when running in its own env, suggesting that there is a bug in docker caching / hash - # computation that makes the test falsely run with the wrong version in the image. As a stop gap solution, separating - # this particular test in its own job made it pass again. - integration-tests-pydantic-v1: - needs: [detect-version-changed, build-and-push-truss-base-images-if-needed] - if: ${{ !failure() && !cancelled() && (needs.build-and-push-truss-base-images-if-needed.result == 'success' || needs.build-and-push-truss-base-images-if-needed.result == 'skipped') }} - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/setup-python/ - - run: poetry install - - run: poetry run pytest truss/tests/test_model_inference.py::test_requirements_pydantic[1] + - run: poetry run pytest truss/tests --durations=0 -m 'integration' --splits 5 --group ${{ matrix.split_group }}" chain-integration-tests: needs: [detect-version-changed, build-and-push-truss-base-images-if-needed] diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ad55c1300..1f4fe95e1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,10 +39,10 @@ jobs: job_type: ["server"] steps: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -71,22 +71,7 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-python/ - run: poetry install - - run: poetry run pytest truss/tests --durations=0 -m 'integration' --splits 5 --group ${{ matrix.split_group }} -k "not test_requirements_pydantic[1]" - - # Running `test_requirements_pydantic[1]` started failing when running together with the other tests. - # We could pin down the issue to the fact that the built image had v2 installed, despite v1 in `requirements.txt` - # The test passes locally and when running in its own env, suggesting that there is a bug in docker caching / hash - # computation that makes the test falsely run with the wrong version in the image. As a stop gap solution, separating - # this particular test in its own job made it pass again. - integration-tests-pydantic-v1: - needs: [detect-version-changed, build-and-push-truss-base-images-if-needed] - if: ${{ !failure() && !cancelled() && (needs.build-and-push-truss-base-images-if-needed.result == 'success' || needs.build-and-push-truss-base-images-if-needed.result == 'skipped') }} - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/setup-python/ - - run: poetry install - - run: poetry run pytest truss/tests/test_model_inference.py::test_requirements_pydantic[1] + - run: poetry run pytest truss/tests --durations=0 -m 'integration' --splits 5 --group ${{ matrix.split_group }} chain-integration-tests: needs: [detect-version-changed, build-and-push-truss-base-images-if-needed] @@ -126,7 +111,7 @@ jobs: run: poetry build - name: Create Release - uses: ncipollo/release-action@v1.12.0 + uses: ncipollo/release-action@v1 with: artifacts: "dist/*" token: ${{ secrets.BASETENBOT_GITHUB_TOKEN }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index d76025a64..ee193f0eb 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -33,7 +33,20 @@ jobs: - uses: ./.github/actions/setup-python/ - run: poetry install - name: run tests (poetry run pytest...) - run: poetry run pytest -v --cov=truss -m 'not integration' + run: poetry run pytest -v --cov=truss -m 'not integration' --junitxml=report.xml + + - name: Store Test Report + uses: actions/upload-artifact@v4 + with: + name: report.xml + path: report.xml + + - name: Publish Test Report # Not sure how to display this in the UI for non PRs. + uses: mikepenz/action-junit-report@v4 + if: always() + with: + commit: ${{github.event.workflow_run.head_sha}} # Doest that work outside PR? + report_paths: "report.xml" markdown-link-check: runs-on: ubuntu-20.04 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a832c6437..5744184a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,23 +36,23 @@ jobs: - uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Docker meta id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v4 with: images: baseten/truss-context-builder - name: Docker Build id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./ file: ./context_builder.Dockerfile @@ -86,7 +86,7 @@ jobs: run: poetry build - name: Create Release - uses: ncipollo/release-action@v1.12.0 + uses: ncipollo/release-action@v1 with: artifacts: "dist/*" token: ${{ secrets.BASETENBOT_GITHUB_TOKEN }}