Skip to content

chore: update flake.nix with GCP service account sa-notifier #350

chore: update flake.nix with GCP service account sa-notifier

chore: update flake.nix with GCP service account sa-notifier #350

Workflow file for this run

name: 'CI'
on:
pull_request:
push:
branches:
- canary
- main
jobs:
build-audit-test:
name: Build & Test all packages on ${{ matrix.os }}, Node ${{ matrix.node }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
max-parallel: 1
matrix:
os: [ubuntu-latest]
# Test all packages using the following Node.js versions:
# 1. Active LTS
# 2. Current (i.e. the latest Node.js version available)
# https://nodejs.org/en/about/releases/
# https://github.com/actions/setup-node?tab=readme-ov-file#supported-version-syntax
node: ['lts/iron', 'current']
# It seems Cloud Build complains with HTTP 429 if I trigger too many builds
# Quota exceeded for quota metric 'Build and Operation Get requests'
steps:
- name: πŸ›ŽοΈ Check out repo
uses: actions/checkout@v4
- name: βš™οΈ Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: βš™οΈ Install dependencies
run: npm ci
- name: πŸ›‘οΈ Audit dependencies (audit-level high)
# https://docs.npmjs.com/cli/v8/commands/npm-audit#audit-level
run: npm audit --audit-level high
- name: πŸ›‘οΈ Audit dependencies (audit-level moderate)
continue-on-error: true
run: npm audit --audit-level moderate
- name: πŸ“¦ Build all libraries
run: npm run build:libs
- name: πŸ” Test @jackdbd/checks
run: npm run test:ci -w packages/checks
- name: πŸ” Test @jackdbd/cloud-scheduler-utils
env:
SA_NOTIFIER: ${{ secrets.SA_NOTIFIER }}
run: npm run test:ci -w packages/cloud-scheduler-utils
- name: πŸ” Test @jackdbd/cloud-tasks-utils
run: npm run test:ci -w packages/cloud-tasks-utils
- name: πŸ” Test @jackdbd/content-security-policy
run: npm run test:ci -w packages/content-security-policy
- name: πŸ” Test @jackdbd/firestore-utils
env:
SA_FIRESTORE_USER_TEST: ${{ secrets.SA_FIRESTORE_USER_TEST }}
SA_FIRESTORE_VIEWER_TEST: ${{ secrets.SA_FIRESTORE_VIEWER_TEST }}
run: npm run test:ci -w packages/firestore-utils
- name: πŸ” Test @jackdbd/notifications
env:
TELEGRAM: ${{ secrets.TELEGRAM }}
run: npm run test:ci -w packages/notifications
- name: πŸ” Test @jackdbd/plausible-client
env:
PLAUSIBLE: ${{ secrets.PLAUSIBLE }}
run: npm run test:ci -w packages/plausible-client
- name: πŸ” Test @jackdbd/schemas
run: npm run test:ci -w packages/schemas
- name: πŸ” Test @jackdbd/secret-manager-utils
env:
SA_SECRET_MANAGER_ADMIN_TEST: ${{ secrets.SA_SECRET_MANAGER_ADMIN_TEST }}
run: npm run test:ci -w packages/secret-manager-utils
- name: πŸ” Test @jackdbd/send-telegram-message
env:
TELEGRAM: ${{ secrets.TELEGRAM }}
run: npm run test:ci -w packages/send-telegram-message
- name: πŸ” Test @jackdbd/sqlite-utils
run: npm run test:ci -w packages/sqlite-utils
- name: πŸ” Test @jackdbd/stripe-utils
run: npm run test:ci -w packages/stripe-utils
- name: πŸ” Test @jackdbd/tags-logger
run: npm run test:ci -w packages/tags-logger
- name: πŸ” Test @jackdbd/telegram-text-messages
run: npm run test:ci -w packages/telegram-text-messages
- name: πŸ” Test @jackdbd/utils
run: npm run test:ci -w packages/utils
- name: ⬆️ Upload test coverage to Codecov
# https://github.com/marketplace/actions/codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true
verbose: true