Skip to content

Commit

Permalink
Revert "build docker image in separate job"
Browse files Browse the repository at this point in the history
This reverts commit 6b4c9f0.
  • Loading branch information
ytausch committed Jul 28, 2024
1 parent 787594e commit 55b3836
Showing 1 changed file with 4 additions and 32 deletions.
36 changes: 4 additions & 32 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,8 @@ concurrency:
cancel-in-progress: true

jobs:
build-tests-docker-image:
name: build-tests-docker-image
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@aa33708b10e362ff993539393ff100fa93ed6a27 # v3

- name: Build and Export Docker Image
uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445 # v6
with:
context: .
tags: ${{ env.IMAGE_NAME }}:test
outputs: type=docker,dest=/tmp/docker-image.tar

- name: Upload Artifact
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4
with:
name: docker-image
path: /tmp/docker-image.tar
tests:
name: tests
needs: build-tests-docker-image
runs-on: "ubuntu-latest"
defaults:
run:
Expand All @@ -46,17 +25,6 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Download Docker Image Artifact
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
with:
name: docker-image
path: /tmp

- name: Load Docker Image
run: |
docker load --input /tmp/docker-image.tar
docker image ls -a
- uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 # v1
with:
environment-file: conda-lock.yml
Expand Down Expand Up @@ -103,6 +71,10 @@ jobs:
env:
MONGODB_CONNECTION_STRING: "mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000"

- name: build docker image
run: |
docker build -t ${{ env.IMAGE_NAME }}:test .
- name: run pytest
run: |
export TEST_BOT_TOKEN_VAL=unpassword
Expand Down

0 comments on commit 55b3836

Please sign in to comment.