Skip to content

wire up emulators, start firestore stuff #21

wire up emulators, start firestore stuff

wire up emulators, start firestore stuff #21

name: Pull Request Events
on: pull_request
permissions:
contents: write
id-token: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
test-unit-python:
name: Unit tests 🐍
runs-on: ubuntu-latest
steps:
- name: ⬇️ Set up code
uses: actions/checkout@v4
with:
show-progress: false
- name: 🐍 Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
cache-dependency-path: ./jobs/setup.py
- name: 📥 Download extra dependencies
run: |
sudo apt-get update
sudo apt-get install -y libkrb5-dev
- name: 🏗 Install module
run: pip install .[tests]
working-directory: ./jobs
- name: 🧪 Run tests
run: pytest
working-directory: ./jobs
test-unit-ui:
name: Unit tests ⎔
runs-on: ubuntu-latest
steps:
- name: ⬇️ Set up code
uses: actions/checkout@v4
- name: ⎔ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
- name: 📥 Download dependencies
run: npm ci
- name: 🧪 Run tests
run: npm test
- name: 🔍 Lint
run: npm run lint
deploy-preview:
name: Firebase preview
runs-on: ubuntu-latest
needs: [test-unit-ui]
if: ${{ github.event.sender.type == 'User' }}
environment:
name: dev
steps:
- name: 🚀 Deploy Firebase
uses: agrc/firebase-website-deploy-composite-action@v1
with:
identity-provider: ${{ secrets.IDENTITY_PROVIDER }}
service-account-email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }}
project-id: ${{ secrets.PROJECT_ID }}
build-command: npm run build
env:
VITE_FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }}