Workflows updated. #3
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
name: Web App CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Change to web app directory | |
run: cd web-app | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Lint with pylint | |
run: | | |
pip install pylint | |
pylint --load-plugins=pylint_flask *.py | |
- name: Run tests | |
run: | | |
pip install pytest flask_testing | |
pytest | |
- name: Build Docker image | |
run: docker build . --file Dockerfile | |
- name: Push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: user/app:latest |