Bump black from 22.12.0 to 23.10.0 #524
Workflow file for this run
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: Main workflow | |
on: | |
# Trigger the workflow on push or pull request, but only for the master branch | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
black: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Run Black | |
run: | | |
pip install -r requirements-dev.txt | |
black --line-length 120 --exclude "\.git|\.github|env|examples" . --check | |
flake: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Lint with flake8 | |
run: | | |
pip install -r requirements-dev.txt | |
flake8 . | |
isort: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Run Isort | |
run: | | |
pip install -r requirements-dev.txt | |
isort . --check | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Test with pytest | |
run: | | |
pip install -r requirements.txt | |
pytest tests/ | |
# deploy: | |
# needs: [black, flake, isort, tests] | |
# runs-on: ubuntu-latest | |
# if: github.ref == 'refs/heads/master' | |
# steps: | |
# - name: Checkout repository | |
# uses: actions/checkout@v2 | |
# | |
# - name: Deploying to Heroku | |
# uses: akhileshns/heroku-deploy@v3.12.12 | |
# with: | |
# heroku_api_key: ${{ secrets.HEROKU_API_KEY }} | |
# heroku_app_name: ${{ secrets.HEROKU_PROJECT_NAME }} | |
# heroku_email: ${{ secrets.HEROKU_EMAIL_ADSRESS }} | |
# deploy: | |
# needs: [black, flake, isort, tests] | |
# runs-on: ubuntu-latest | |
# if: github.ref == 'refs/heads/master' | |
# steps: | |
# - name: Checkout repository | |
# uses: actions/checkout@v2 | |
# with: | |
# fetch-depth: 0 | |
# | |
# - name: Deploy to Dokku | |
# uses: idoberko2/dokku-deploy-github-action@v1 | |
# with: | |
# ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
# dokku-host: ${{ secrets.DOKKU_HOST }} | |
# app-name: ${{ secrets.DOKKU_APPLICATION }} | |
# git-push-flags: '--force' | |
deploy: | |
needs: [black, flake, isort, tests] | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- run: flyctl deploy --remote-only | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |