Skip to content

Test & Deploy Automation #10

Test & Deploy Automation

Test & Deploy Automation #10

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 --check'
Test:
needs: Lint
runs-on: ubuntu-latest
strategy:
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