Skip to content

Commit

Permalink
Merge pull request #32 from jackdbd/canary
Browse files Browse the repository at this point in the history
Merge `canary` into `main`
  • Loading branch information
jackdbd authored Sep 14, 2022
2 parents 421bb0c + 5f7d830 commit 7cc98f4
Show file tree
Hide file tree
Showing 117 changed files with 9,183 additions and 8,584 deletions.
52 changes: 28 additions & 24 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,21 @@ on:
- main

jobs:
ci-on-cloud-build:
name: CI on ${{ matrix.os }}, Node.js ${{ matrix.node }}
build-audit-test:
name: Build & Test all packages on ${{ matrix.os }}, Node ${{ matrix.node }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
# pick at least one Node.js `lts` version and the `current` version (i.e. the latest Node.js version available)
# Try testing all packages with:
# 1. Maintenance LTS
# 2. Active LTS
# 3. Current (i.e. the latest Node.js version available)
# https://nodejs.org/en/
# node: ['16.15.1', 'current']
# https://nodejs.org/en/about/releases/
# it seems Cloud Build complains with HTTP 429 if I trigger too many builds
# Quota exceeded for quota metric 'Build and Operation Get requests'
node: ['16.15.1']
node: ['16.17.0', 'current']
steps:
- name: 🛎️ Check out repo
uses: actions/checkout@v3
Expand All @@ -32,69 +35,70 @@ jobs:
- name: ⚙️ Install dependencies
run: npm ci

- name: 🛡️ Audit dependencies
- name: 🛡️ Audit dependencies (audit-level high)
# https://docs.npmjs.com/cli/v8/commands/npm-audit#audit-level
run: npm audit --audit-level high

- name: 🔧 Build packages
- 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 library @jackdbd/checks
- name: 🔍 Test @jackdbd/checks
run: npm run test:ci -w packages/checks

- name: 🔍 Test library @jackdbd/cloud-scheduler-utils
- name: 🔍 Test @jackdbd/cloud-scheduler-utils
env:
SA_NOTIFIER: ${{ secrets.SA_NOTIFIER }}
run: npm run test:ci -w packages/cloud-scheduler-utils

- name: 🔍 Test library @jackdbd/cloud-tasks-utils
- name: 🔍 Test @jackdbd/cloud-tasks-utils
run: npm run test:ci -w packages/cloud-tasks-utils

- name: 🔍 Test library @jackdbd/firestore-utils
- 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 library @jackdbd/notifications
- name: 🔍 Test @jackdbd/notifications
env:
TELEGRAM: ${{ secrets.TELEGRAM }}
run: npm run test:ci -w packages/notifications

- name: 🔍 Test library @jackdbd/plausible-client
- name: 🔍 Test @jackdbd/plausible-client
env:
PLAUSIBLE: ${{ secrets.PLAUSIBLE }}
run: npm run test:ci -w packages/plausible-client

- name: 🔍 Test library @jackdbd/schemas
- name: 🔍 Test @jackdbd/schemas
run: npm run test:ci -w packages/schemas

- name: 🔍 Test library @jackdbd/secret-manager-utils
- 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 library @jackdbd/send-telegram-message
- name: 🔍 Test @jackdbd/send-telegram-message
env:
TELEGRAM: ${{ secrets.TELEGRAM }}
run: npm run test:ci -w packages/send-telegram-message

- name: 🔍 Test library @jackdbd/sqlite-utils
- name: 🔍 Test @jackdbd/sqlite-utils
run: npm run test:ci -w packages/sqlite-utils

- name: 🔍 Test library @jackdbd/stripe-utils
- name: 🔍 Test @jackdbd/stripe-utils
run: npm run test:ci -w packages/stripe-utils

- name: 🔍 Test library @jackdbd/tags-logger
- name: 🔍 Test @jackdbd/tags-logger
run: npm run test:ci -w packages/tags-logger

# - name: 🔍 Test library @jackdbd/telegram-bot
# run: npm run test:ci -w packages/telegram-bot

- name: 🔍 Test library @jackdbd/telegram-text-messages
- name: 🔍 Test @jackdbd/telegram-text-messages
run: npm run test:ci -w packages/telegram-text-messages

- name: 🔍 Test library @jackdbd/utils
- name: 🔍 Test @jackdbd/utils
run: npm run test:ci -w packages/utils

- name: ⬆️ Upload test coverage to Codecov
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/release-to-npmjs.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: 'release-to-npmjs'
name: 'Release to npmjs.com'

on:
pull_request:
push:
branches:
- canary
Expand All @@ -14,7 +13,10 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: ['16.15.1']
# Use the Active LTS for this workflow
# https://nodejs.org/en/
# https://nodejs.org/en/about/releases/
node: ['16.17.0']
steps:
- name: 🛎️ Check out repo
uses: actions/checkout@v3
Expand All @@ -24,10 +26,10 @@ jobs:
with:
node-version: ${{ matrix.node }}

- name: 👀 Check npm version
run: npm version
# - name: 👀 Check npm version
# run: npm version

- name: ⬇️ Install dependencies from npmjs
- name: ⬇️ Install dependencies
run: npm install
# run: npm install --legacy-peer-deps

Expand Down
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"editor.formatOnSave": false,
"files.associations": { "*.json": "jsonc" },
// The extension pflannery.vscode-versionlens works only if the file type
// associated to package.json is json, not jsonc.
// For tsconfig files we can use jsonc without issues.
// https://marketplace.visualstudio.com/items?itemName=pflannery.vscode-versionlens
"files.associations": {
"*.json": "json",
"tsconfig*.json": "jsonc"
},
"files.exclude": {
"**/node_modules/": true
},
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Calderone

![CI workflow](https://github.com/jackdbd/calderone/actions/workflows/ci.yaml/badge.svg)
![release-to-npmjs workflow](https://github.com/jackdbd/calderone/actions/workflows/release-to-npmjs.yaml/badge.svg)
![Release to npmjs.com workflow](https://github.com/jackdbd/calderone/actions/workflows/release-to-npmjs.yaml/badge.svg)
[![codecov](https://codecov.io/gh/jackdbd/calderone/branch/main/graph/badge.svg?token=P5uJ3doRer)](https://codecov.io/gh/jackdbd/calderone)
[![CodeFactor](https://www.codefactor.io/repository/github/jackdbd/calderone/badge)](https://www.codefactor.io/repository/github/jackdbd/calderone)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)
Expand All @@ -14,7 +14,7 @@ Monorepo that I use for a bunch of stuff, managed with [npm workspaces](https://
>
> All libraries of this monorepo are published to npmjs as ECMAScript modules.
>
> At the moment no one of these packages has a CommonJS build.
> At the moment none of these packages has a CommonJS build.
## Installation

Expand Down
6 changes: 3 additions & 3 deletions docs/cloud-scheduler-utils/assets/highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
--dark-hl-6: #4FC1FF;
--light-hl-7: #795E26;
--dark-hl-7: #DCDCAA;
--light-code-background: #F5F5F5;
--light-code-background: #FFFFFF;
--dark-code-background: #1E1E1E;
}

Expand Down Expand Up @@ -43,7 +43,7 @@
--code-background: var(--dark-code-background);
} }

body.light {
:root[data-theme='light'] {
--hl-0: var(--light-hl-0);
--hl-1: var(--light-hl-1);
--hl-2: var(--light-hl-2);
Expand All @@ -55,7 +55,7 @@ body.light {
--code-background: var(--light-code-background);
}

body.dark {
:root[data-theme='dark'] {
--hl-0: var(--dark-hl-0);
--hl-1: var(--dark-hl-1);
--hl-2: var(--dark-hl-2);
Expand Down
Loading

0 comments on commit 7cc98f4

Please sign in to comment.