build(deps): bump @google-cloud/firestore and firebase-admin #132
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: devradar.io | |
on: [push] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
test-lint-eslint: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.PACKAGE_TOKEN }}" >> .npmrc | |
name: add auth token for npm packages | |
- run: npm ci | |
- run: npm run lint | |
name: eslint/standard | |
test-lint-tsc: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.PACKAGE_TOKEN }}" >> .npmrc | |
name: add auth token for npm packages | |
- run: npm ci | |
- run: npm run build | |
name: tsc build | |
test-e2e-volatile: | |
runs-on: ubuntu-20.04 | |
env: | |
VUE_APP_BACKEND_TYPE: 'testVolatile' | |
CYPRESS_RETRIES: 2 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.PACKAGE_TOKEN }}" >> .npmrc | |
name: add auth token for npm packages | |
- name: install dependencies | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: npm ci | |
- name: build | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: npm run build | |
- name: cypress tests w/ local storage | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 30 | |
max_attempts: 2 | |
command: npm run test:e2e:run | |
unique_id: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Generate unique id | |
id: unique_id | |
run: echo "::set-output name=id::$(uuidgen)" | |
outputs: | |
unique_id: ${{ steps.unique_id.outputs.id }} | |
test-e2e-firebase: | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' # run only on master to make sure badge works and records are not wasted | |
runs-on: ubuntu-20.04 | |
needs: [unique_id] | |
env: | |
VUE_APP_BACKEND_TYPE: 'firebase' | |
VUE_APP_BACKEND_PROJECT: ${{ secrets.FIREBASE_E2E_PROJECT }} | |
VUE_APP_BACKEND_KEY: ${{ secrets.FIREBASE_E2E_CLIENTKEY }} | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_KEY }} | |
CYPRESS_RETRIES: 2 | |
FIREBASE_SERVICEACCOUNT: ${{ secrets.FIREBASE_E2E_ACCOUNTKEY }} | |
CI_UNIQUE_ID: ${GITHUB_SHA}-${{needs.unique_id.outputs.unique_id}} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.PACKAGE_TOKEN }}" >> .npmrc | |
name: add auth token for npm packages | |
- name: install dependencies | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: npm ci | |
- name: build | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: npm run build | |
- name: cypress tests w/ firebase backend | |
run: | | |
echo unique ID is: ${CI_UNIQUE_ID} | |
npm run test:e2e:ci:firebase:record # cypress key provided via CYPRESS_RECORD_KEY env variable | |
firebase-deploy: | |
name: "publish devradar.io" | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
needs: [test-lint-eslint, test-lint-tsc, test-e2e-volatile, test-e2e-firebase] | |
runs-on: ubuntu-20.04 | |
env: | |
VUE_APP_BACKEND_TYPE: 'firebase' | |
VUE_APP_BACKEND_PROJECT: ${{ secrets.FIREBASE_DAAS_PROJECT }} | |
VUE_APP_BACKEND_KEY: ${{ secrets.FIREBASE_DAAS_CLIENTKEY }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.PACKAGE_TOKEN }}" >> .npmrc | |
name: add auth token for npm packages | |
- run: npm ci | |
- run: npm run build | |
- run: | | |
npm i -g firebase-tools | |
firebase deploy --token ${{ secrets.FIREBASE_DAAS_TOKEN }} --project ${{ secrets.FIREBASE_DAAS_PROJECT }} | |
name: deploy to firebase |