Skip to content

Commit

Permalink
add linting and deploy github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaelSiidorow committed May 3, 2024
1 parent c8cef8e commit f6cb990
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Lint and typecheck

on:
pull_request:
branches:
- main
workflow_call:

jobs:
lint:
name: Lint and typecheck
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install poetry
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install poetry
- name: Set up Python 3.12.3
uses: actions/setup-python@v5
with:
python-version: "3.12.3"
cache: "poetry"

- name: Install dependencies
run: |
poetry install
- name: Lint with ruff
run: |
poetry run poe lint
- name: Typecheck with mypy
run: |
poetry run poe check
22 changes: 22 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Fly Deploy

on:
push:
branches:
- main

jobs:
lint:
uses: ./.github/workflows/lint.yml
deploy:
name: Deploy to Fly
runs-on: ubuntu-latest
concurrency: deploy-group
needs:
- lint
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@v1
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

0 comments on commit f6cb990

Please sign in to comment.