Fix Deploy #70
Workflow file for this run
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
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.12' | |
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 PNPM | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: ⎔ Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: pnpm | |
- name: 📥 Download dependencies | |
run: pnpm install | |
- name: 🧪 Run tests | |
run: pnpm test | |
- name: 🔍 Lint | |
run: pnpm run lint | |
deploy-firebase-preview: | |
name: Firebase preview | |
runs-on: ubuntu-latest | |
needs: [test-unit-ui, test-unit-python] | |
if: ${{ github.event.sender.type == 'User' && github.head_ref != 'dev' }} | |
environment: | |
name: dev | |
steps: | |
- name: ⬇️ Set up code | |
uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: 🚀 Deploy Firebase project to preview | |
uses: ./.github/actions/deploy-firebase | |
with: | |
identity_provider: ${{ secrets.IDENTITY_PROVIDER }} | |
service_account_email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }} | |
project_id: ${{ secrets.PROJECT_ID }} | |
firebase_config: ${{ secrets.FIREBASE_CONFIG }} | |
preview: 'yes' | |
build_command: pnpm run build -- --mode dev | |
repo_token: ${{ secrets.GITHUB_TOKEN }} |