Skip to content

Commit

Permalink
Merge branch 'release/0.1.1a1'
Browse files Browse the repository at this point in the history
  • Loading branch information
francipvb committed Feb 2, 2022
2 parents a4cf83f + 981e8b0 commit 2790bff
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 3 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
on:
pull_request:
branches:
- "main"
- "develop"
push:
tags:
- "v*"

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python_version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
- run: pip install --upgrade pip poetry coveralls
- uses: actions/checkout@v2
- run: poetry install
- run: poetry run pytest --cov=fastapi_firebase
- run: poetry run coverage lcov
- name: Upload coverage data to coveralls.io
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: python${{ matrix.python_version }}
COVERALLS_PARALLEL: true

coveralls:
name: Indicate completion to coveralls.io
needs: test
runs-on: ubuntu-latest
container:
image: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

deploy:
name: Publish package
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: actions/checkout@v2
- run: pip install --upgrade pip poetry
name: Install dependencies
- run: poetry build
name: Build package
- run: poetry publish
if: startsWith(github.ref, 'refs/tags/')
env:
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }}
- uses: softprops/action-gh-release@v0.1.14
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/*
19 changes: 19 additions & 0 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Code quality checks

on:
pull_request:

jobs:
lint_code:
name: Lint code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python_version: 3.9
- run: pip install poetry
- run: poetry install
id: deps
- run: poetry run flake8
- run: poetry run mypy .
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exclude = [
]
name = "fastapi-firebase"
readme = "README.md"
version = "0.1.0"
version = "0.1.1a1"

[tool.poetry.dependencies]
fastapi = "^0.60.0"
Expand All @@ -34,5 +34,8 @@ requires = ["poetry-core>=1.0.0"]
line_length = 100
profile = "black"

[tol.black]
[tool.black]
line-length = 100

[tool.mypy]
ignore_missing_imports = true
2 changes: 1 addition & 1 deletion tests/test_app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from fastapi import Depends, FastAPI, testclient
from firebase_admin import App, _DEFAULT_APP_NAME
from firebase_admin import App

from fastapi_firebase import app as fire

Expand Down

0 comments on commit 2790bff

Please sign in to comment.