Skip to content

Commit

Permalink
feat: init copy sdk:src/agent/javascript -> packages/agent
Browse files Browse the repository at this point in the history
  • Loading branch information
gobengo committed Sep 10, 2020
0 parents commit d32e6ec
Show file tree
Hide file tree
Showing 83 changed files with 14,232 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check PR title
on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: hansl/[email protected]
with:
success-state: Title follows the specification.
failure-state: Title does not follow the specification.
context-name: conventional-pr-title
preset: conventional-changelog-angular@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/nodejs-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Node.js CI

on: [push]

jobs:
test:

runs-on: ubuntu-latest

strategy:
matrix:
node:
- '10'
- '12'
- '14'

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: npm install
- # I don't want to do this, but when devving with nektos/act, postinstall wasn't getting run.
# Then, the later `npm test` would fail because packages/* didn't have their devDependencies.
# The test beforehand won't do it if the relevant subpackge's ndoe_modules were already fetched.
run: "[ -d packages/agent/node_modules ] || npm run postinstall"
- run: npm run build --if-present
- run: npm test
env:
CI: true
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: NPM Release

on:
workflow_dispatch:
inputs:
canary:
default: 'true'

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: git config identity
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- if: ${{ inputs.canary }}
run: npx lerna publish --canary --yes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- if: ${{ ! inputs.canary }}
run: npx lerna publish --yes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103 changes: 103 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port
29 changes: 29 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
pull_request_rules:
- name: Automatic merge
conditions:
- "#approved-reviews-by>=1"
- "#changes-requested-reviews-by=0"
- status-success=conventional-pr-title
- label=automerge-squash
actions:
merge:
method: squash
strict: smart
commit_message: title+body
delete_head_branch: {}

- name: Clean up automerge tags
conditions:
- closed
actions:
label:
remove:
- automerge-squash

- name: Auto-approve auto-PRs
conditions:
- author=dfinity-bot
actions:
review:
type: APPROVE
message: This bot trusts that bot
Loading

0 comments on commit d32e6ec

Please sign in to comment.