Dev #469
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: Node CI Tests | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main", "dev" ] | |
workflow_dispatch: | |
jobs: | |
jest-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ 18.x ] | |
java-version: [ 21 ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Use Java ${{ matrix.java-version }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java-version }} | |
- name: Set Environment Variables | |
env: | |
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
FLICKER_USER_ID: ${{ secrets.FLICKER_USER_ID }} | |
FLICKER_API_KEY: ${{ secrets.FLICKER_API_KEY }} | |
GOOGLE_PLACES_API_KEY: ${{ secrets.GOOGLE_PLACES_API_KEY }} | |
FIREBASE_EMULATOR_ADDRESS: 127.0.0.1 | |
FIREBASE_AUTH_PORT: 9099 | |
FIREBASE_FIRESTORE_PORT: 8080 | |
FIREBASE_CLOUD_FUNCTIONS_PORT: 5001 | |
FIREBASE_STORAGE_PORT: 9199 | |
run: echo "Environment variables set" | |
- name: Install Dependencies | |
run: | | |
yarn install | |
yarn global add firebase-tools | |
- name: Build Cloud Functions | |
working-directory: ./functions | |
run: | | |
npm install | |
npm run build | |
- name: Run Tests | |
env: | |
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
FLICKER_USER_ID: ${{ secrets.FLICKER_USER_ID }} | |
FLICKER_API_KEY: ${{ secrets.FLICKER_API_KEY }} | |
GOOGLE_PLACES_API_KEY: ${{ secrets.GOOGLE_PLACES_API_KEY }} | |
FIREBASE_EMULATOR_ADDRESS: 127.0.0.1 | |
FIREBASE_AUTH_PORT: 9099 | |
FIREBASE_FIRESTORE_PORT: 8080 | |
FIREBASE_CLOUD_FUNCTIONS_PORT: 5001 | |
FIREBASE_STORAGE_PORT: 9199 | |
run: firebase emulators:exec 'yarn test' |