If you're getting this kind of error when running Node.js programs with binary dependencies that don't support M1 yet, e.g.:
$ yarn test
dyld[51175]: missing symbol called
dyld[51176]: missing symbol called
#!/bin/bash | |
set -e # will stop the script if any command fails with a non-zero exit code | |
function cleanup { | |
./teardown.sh || true # keep tearing down, even if file does not exist | |
echo "🧹 Cleaned up." | |
} | |
trap cleanup EXIT |
TAR_FILE="secret-archive.tgz" | |
DEST_FILE="crypted-secret-archive.tgz.gpg" | |
# Archive | |
tar cvzf "${TAR_FILE}" ${SECRET_FILES_PATH}/* | |
# Encrypt | |
echo "${GPG_PASSPHRASE}" | gpg --batch --yes --passphrase-fd 0 -o "${DEST_FILE}" --symmetric "${TAR_FILE}" | |
# Decrypt |
git fetch | |
echo "\nStashes:" | |
git stash list | cat | |
echo "\nLocal branches + their associated remote:" | |
git branch -vv | cat | |
echo "\nCommits not yet pushed, from all branches that are already on remote:" | |
git log --branches --not --remotes | cat |
# [...] | |
sonarcloud: | |
needs: | |
- test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
# Disabling shallow clone is recommended for improving relevancy of reporting, cf https://sonarcloud.io/project/configuration?analysisMode=GitHubActions |
# This script returns the value of the latest enabled revision of the requested secret. | |
# Usage: get-last-active-gcp-secret-revision.sh <secret-name> | |
SECRET_NAME=$1; shift; | |
if [ -z ${SECRET_NAME} ]; then | |
echo "Error: please specify the name of the secret to get." | |
echo "Available secrets:" | |
gcloud secrets list |
/// <reference types="node" /> | |
declare namespace NodeJS { | |
export interface ProcessEnv { | |
NODE_ENV: 'development' | 'production' | undefined; | |
} | |
export interface Process { | |
env: ProcessEnv |
# source: https://github.com/docker/buildx/pull/535#issuecomment-869022231 | |
e2e: | |
name: End-to-end tests against Docker containers | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_BUILDKIT: '1' # to enable persistent docker cache | |
COMPOSE_DOCKER_CLI_BUILD: '1' # so docker-compose commands benefits from buildkit/buildx's docker cache | |
steps: | |
- uses: actions/checkout@v2 |
steps: | |
- uses: browniebroke/read-nvmrc-action@v1 # Read node version from `.nvmrc` file | |
id: nvmrc | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '${{ steps.nvmrc.outputs.node_version }}' |
const ts = require("typescript") | |
/** | |
* Extract the keys of a type defined in a .d.ts file. | |
* @param filename - name of the .d.ts file | |
* @param namespace - namespace where the type is defined | |
* @param typeName - name of the type | |
* @param options - options to pass to the TypeScript parser | |
* @returns an array of keys, expressed as strings | |
*/ |