Skip to content

Commit

Permalink
update Docker and GitHub Actions setup for lab5 requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
meloian committed Apr 30, 2024
1 parent fc7d741 commit ade97e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Build
name: Docker Build and Test

on: [push, pull_request]

Expand All @@ -15,5 +15,11 @@ jobs:
- name: Build Docker image
run: docker build . -t my-application

- name: Run Docker container
run: docker run --rm my-application
- name: Push to Docker Registry
run: docker push my-application:latest

- name: Pull and Run Docker container
run: docker run --rm my-application

- name: Execute Tests
run: docker run --rm my-application python3 -m unittest discover -s /app -p 'test_*.py'
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ COPY lab3 /app/lab3

ENV NAME World

CMD ["python3", "-m", "unittest", "discover", "-s", "/app/lab1", "-p", "test_*.py"]
CMD ["python3", "-m", "unittest", "discover", "-s", "/app", "-p", "test_*.py"]

0 comments on commit ade97e7

Please sign in to comment.