added lambda handler and some Make commands #2
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| services: | |
| docker: | |
| image: docker:19.03.12 | |
| options: --privileged | |
| ports: | |
| - 8000:8000 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.9 | |
| - name: Install dependencies | |
| run: | | |
| python -m venv venv | |
| source venv/bin/activate | |
| pip install -r requirements.txt | |
| pip install black flake8 pytest | |
| - name: Lint with flake8 | |
| run: | | |
| source venv/bin/activate | |
| flake8 . | |
| - name: Format with black | |
| run: | | |
| source venv/bin/activate | |
| black --check . | |
| - name: Run tests | |
| run: | | |
| source venv/bin/activate | |
| pytest |