Skip to content

2024 moreupdates

2024 moreupdates #5

# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: Deploy to Firebase Hosting on PR
on:
pull_request:
types: [opened, edited, synchronize, reopened]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: cache node modules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('client/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: npm install
run: cd client && npm ci
- name: check linting passes
run: cd client && npm run lint:nofix
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: cache node modules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('client/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: npm install
run: cd client && npm ci
- name: unit tests
run: cd client && npm run test:unit
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
needs: [lint, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: cd client && npm ci && npm run build
- name: Deploy with Firebase
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_HERMES_BBE43 }}'
projectId: hermes-bbe43