Upgrade firebase api to newer one #357
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: Jest CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
IMAGE_NAME: middle | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
services: | |
mysql: | |
image: mysql:8 | |
env: | |
MYSQL_DATABASE: github_actions | |
MYSQL_ROOT_PASSWORD: password | |
options: >- | |
--health-cmd "mysqladmin ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 3306:3306 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "20.x" | |
- name: Cache Node.js modules | |
uses: actions/cache@v2 | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.OS }}-node- | |
${{ runner.OS }}- | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Migrate DB | |
run: npx typeorm migration:run -d dist/server/src/datasource.js | |
env: | |
NODE_ENV: ci | |
- name: Test | |
run: npm run test | |
env: | |
NODE_ENV: ci | |
FIREBASE_PROJECT_ID: ${{secrets.FIREBASE_PROJECT_ID}} | |
FIREBASE_PRIVATE_KEY: ${{secrets.FIREBASE_PRIVATE_KEY}} | |
FIREBASE_CLIENT_EMAIL: ${{secrets.FIREBASE_CLIENT_EMAIL}} |