-
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.
* gh workflow * include tox in test deps * update ci * tweak ci env vars * tweak creds path * tweak ci * add strategy * fix ci bug * new lint job * update black * update black args * add Build-Deploy job to ci
- Loading branch information
Showing
8 changed files
with
101 additions
and
8 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,69 @@ | ||
name: Test, Build & Deploy FireFrame | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
env: | ||
PROJECT_ID: ${{ secrets.FIREBASE_TEST_PROJECT_ID }} | ||
jobs: | ||
Lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: 'actions/checkout@v4' | ||
- uses: 'psf/black@stable' | ||
with: | ||
version: '23.11.0' | ||
src: './' | ||
options: '--line-length 120 --check' | ||
Test: | ||
needs: Lint | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['3.8', '3.9', '3.10', '3.11'] | ||
steps: | ||
- uses: 'actions/checkout@v4' | ||
- uses: 'google-github-actions/auth@v2' | ||
with: | ||
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}' | ||
- run: | | ||
gcloud config set project $PROJECT_ID | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -e .[test] | ||
- name: Run tests | ||
env: | ||
GOOGLE_CLOUD_PROJECT: ${{ secrets.FIREBASE_TEST_PROJECT_ID }} | ||
run: | | ||
export GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_GHA_CREDS_PATH | ||
pytest -n 4 | ||
Build-Deploy: | ||
needs: [Lint, Test] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' | ||
steps: | ||
- uses: 'actions/checkout@v4' | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install build | ||
- name: Build package | ||
run: python -m build | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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 |
---|---|---|
|
@@ -42,6 +42,7 @@ dev = [ | |
test = [ | ||
"httpx==0.25.2", | ||
"pytest==7.4.3", | ||
"pytest-xdist==3.5.0", | ||
] | ||
|
||
[project.scripts] | ||
|
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
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
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
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
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
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