Merge branch 'main' of https://github.com/Alex1-ai/food-recipy-api #8
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
--- # the --- signifies that it is a yaml file | |
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}} | |
# checkout is to put the codes into the ubuntu we are using here | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# ubuntu-20.04 automatically comes with a preinstalled docker so we don't have to install it again | |
- name: Test | |
run: docker-compose run --rm app sh -c "python manage.py wait_for_db && python manage.py test" | |
- name: Lint | |
run: docker-compose run --rm app sh -c "flake8" |