-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f286fa
commit db1356a
Showing
1 changed file
with
6 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,21 @@ | ||
--- | ||
name: Checks | ||
|
||
on: [push] # Runs when we Push to Github | ||
|
||
# Ubuntu 20.04 comes with docker-compose by default. Hence why we did not install it. | ||
on: [push] | ||
|
||
jobs: | ||
test-lint: | ||
name: Test and Lint | ||
runs-on: ubuntu-20.04 # Specifies the O.S where this job will be run. | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Login to Docker Hub | ||
users: docker/login-action@v1 # Logs in to Docker Hub | ||
users: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USER }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Checkout | ||
users: actions/checkout@v2 # Grants us access to the code we pushed | ||
users: actions/checkout@v2 | ||
- name: Test | ||
run: docker-compose run --rm app sh -c "python manage.py test" # Runs the unit tests | ||
run: docker-compose run --rm app sh -c "python manage.py test" | ||
- name: Lint | ||
run: docker-compose run --rm app sh -c "flake8" # Runs the linting tests | ||
run: docker-compose run --rm app sh -c "flake8" |