Skip to content

Commit

Permalink
Added Github actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivamMenda committed Sep 2, 2023
1 parent 8330d8f commit bde8596
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Checks

on: [push]

jobs:
test-lint:
name: Test and Lint
runs-on: ubuntu-20.04
steps:
- name: Login to docker hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v2
- name: Test
run: docker-compose run --rm app sh -c "python manage.py test"
- name: Lint
run: docker-compose run --rm app sh -c "flake8"

2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ services:
volumes:
- ./app:/app
command: >
sh -c "python manage.py runserver 0.0.0.0:8000"
sh -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"

0 comments on commit bde8596

Please sign in to comment.