@@ -23,12 +23,21 @@ jobs:
|
||||
-p "8081:8081" \
|
||||
eclipse-mosquitto:latest
|
||||
- name: Build the test image.
|
||||
run: docker buildx build -f Dockerfile.test -t ${{ gitea.repository }}:test .
|
||||
uses: docker/build-and-push@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.test
|
||||
platforms: |
|
||||
linux/arm64
|
||||
linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
gitea.housh.dev/michael/${{ gitea.repository }}:${{ gitea.sha }}
|
||||
- name: Run Test
|
||||
run: >
|
||||
docker run --rm \
|
||||
-e MOSQUITTO_SERVER=127.0.0.1 \
|
||||
${{ gitea.repository }}:test \
|
||||
gitea.housh.dev/michael/${{ gitea.repository }}:${{ gitea.sha }} \
|
||||
swift test
|
||||
- name: Cleanup.
|
||||
if: always()
|
||||
|
||||
@@ -3,4 +3,5 @@ WORKDIR /app
|
||||
COPY ./Package.* ./
|
||||
RUN swift package resolve
|
||||
COPY . .
|
||||
RUN swift build
|
||||
CMD ["/bin/bash", "-xc", "swift", "test"]
|
||||
|
||||
Reference in New Issue
Block a user