mirror of
https://github.com/privacy-scaling-explorations/p0tion.git
synced 2026-05-13 03:01:08 -04:00
57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
name: Test p0tion
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
github_ref:
|
|
description: 'The branch or tag ref that triggered the workflow'
|
|
required: true
|
|
type: string
|
|
|
|
environment:
|
|
description: 'Environment to deploy to'
|
|
required: true
|
|
type: string
|
|
|
|
firebase_project:
|
|
description: 'The name of the Firebase project to test'
|
|
required: true
|
|
type: string
|
|
|
|
|
|
jobs:
|
|
test-p0tion:
|
|
runs-on: ubuntu-22.04
|
|
environment: ${{ inputs.environment }}
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ inputs.github_ref }}
|
|
|
|
- name: Install npm packages and write env
|
|
run: |
|
|
yarn install --immutable
|
|
echo "${{ secrets.ACTIONS_ENV_FILE }}" > ./packages/actions/.env
|
|
echo "${{ secrets.BACKEND_ENV_FILE }}" > ./packages/backend/.env
|
|
|
|
- name: write Firebase service account key
|
|
id: create-json
|
|
uses: jsdaniell/create-json@v1.2.1
|
|
with:
|
|
name: "serviceAccountKey.json"
|
|
json: ${{ secrets.SERVICE_ACCOUNT_KEY }}
|
|
dir: "./packages/backend/"
|
|
|
|
- name: run test (unit & e2e)
|
|
run: yarn test:ci-prod
|
|
env:
|
|
GOOGLE_APPLICATION_CREDENTIALS: ./packages/backend/serviceAccountKey.json
|
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
|
|
|
- name: Coveralls
|
|
uses: coverallsapp/github-action@master
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
path-to-lcov: ./coverage/lcov.info
|