-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add linting and deploy github actions
- Loading branch information
1 parent
c8cef8e
commit f6cb990
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
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
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 }} |