feat: Run CI
Some checks failed
CI / Run Tests (push) Failing after 3s

This commit is contained in:
2024-11-14 18:39:10 -05:00
parent 6371ffed47
commit 4024bb624f
3 changed files with 12 additions and 4 deletions

View File

@@ -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()

View File

@@ -3,4 +3,5 @@ WORKDIR /app
COPY ./Package.* ./
RUN swift package resolve
COPY . .
RUN swift build
CMD ["/bin/bash", "-xc", "swift", "test"]

View File

@@ -26,5 +26,3 @@ test-docker:
@docker-compose run --build --remove-orphans -i --rm test
@docker-compose kill mosquitto-test
@docker-compose rm -f
test: test-docker