Skip to content

Merge pull request #8 from lamehost/dependabot/pip/idna-3.7 #25

Merge pull request #8 from lamehost/dependabot/pip/idna-3.7

Merge pull request #8 from lamehost/dependabot/pip/idna-3.7 #25

name: Test and deploy
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
jobs:
Test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry pytest
poetry install --no-interaction --no-ansi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run flake8 anastasia tests --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings
poetry run flake8 anastasia tests --count --exit-zero --max-complexity=10 --statistics
- name: Test with pytest
run: |
poetry run pytest
Deploy:
needs: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --local-only