Skip to content

Commit 48e66c6

Browse files
committed
add compose file
1 parent 001131f commit 48e66c6

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

.github/workflows/build_test.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,31 @@ jobs:
5757
needs: build
5858
runs-on: ubuntu-latest
5959
steps:
60-
- name: Checkout repository
61-
uses: actions/checkout@v4
6260

6361
- name: Set up Docker Compose
6462
run: |
6563
sudo apt-get update
6664
sudo apt-get install -y docker-compose
6765
68-
- name: Pull the latest image
69-
run: |
70-
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
66+
- name: Log in to the Container registry
67+
uses: docker/login-action@v3
68+
with:
69+
registry: ${{ env.REGISTRY }}
70+
username: ${{ github.actor }}
71+
password: ${{ secrets.GITHUB_TOKEN }}
72+
73+
74+
# - name: Pull the latest image
75+
# run: |
76+
# docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
7177

7278
- name: Run tests with Docker Compose
7379
run: |
7480
docker-compose -f docker-compose.test.yml up --exit-code-from tests
7581
env:
7682
IMAGE_TAG: ${{ github.sha }}
83+
REGISTRY: ${{ env.REGISTRY }}
84+
IMAGE_NAME: ${{ env.IMAGE_NAME }}
7785

7886
- name: Clean up
7987
if: always()

docker-compose.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: '0.0.1'
2+
3+
services:
4+
tests:
5+
image: ${REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}
6+
command: python -m pytest tests/

0 commit comments

Comments
 (0)