Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2061 from trufflesuite/develop
Browse files Browse the repository at this point in the history
Release v7.0.0
  • Loading branch information
davidmurdoch committed Jan 19, 2022
2 parents ff312f6 + ef1858d commit 2102c7d
Show file tree
Hide file tree
Showing 815 changed files with 130,492 additions and 44,165 deletions.
2 changes: 0 additions & 2 deletions .dockerignore

This file was deleted.

6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
docs/assets/launch.json linguist-language=JSON5
tsconfig-base.json linguist-language=JSON5
.nycrc linguist-language=JSON
.prettierrc linguist-language=JSON
src/packages/ganache/api-extractor.json linguist-language=JSON5
src/packages/ganache/tsdoc.json linguist-language=JSON5
16 changes: 16 additions & 0 deletions .github/workflows/cancel-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This workflow will cancel PR workflow runs when a new one gets started

name: Cancel Redundant PR Builds

on: [pull_request]

jobs:
cancel:
name: Cancel Previous Runs
runs-on: ubuntu-20.04
timeout-minutes: 3
steps:
- uses: styfle/cancel-workflow-action@0.7.0
with:
workflow_id: 5127767
access_token: ${{ github.token }}
42 changes: 42 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Pull Requests

on: [pull_request]

jobs:
build:
strategy:
fail-fast: false
matrix:
node: [12.0.0, 12.x, 14.x, 16.x, 17.x]
os: [windows-2019, ubuntu-18.04, ubuntu-20.04, macos-11]

runs-on: ${{ matrix.os }}

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}

- name: Add msbuild to PATH
# we need msbuild tools for the `bcrypto` module
if: startsWith(matrix.os, 'windows-')
uses: microsoft/setup-msbuild@v1.0.2

- run: npm ci
- run: npm run tsc
- run: npm test
env:
FORCE_COLOR: 1
INFURA_KEY: ${{ secrets.TEST_INFURA_KEY }}
86 changes: 86 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Commits

on: [push]

jobs:
build:
strategy:
fail-fast: false
matrix:
node: [12.0.0, 12.x, 14.x, 16.x, 17.x]
os: [ubuntu-20.04]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm run tsc
- run: npm test
env:
FORCE_COLOR: 1
INFURA_KEY: ${{ secrets.TEST_INFURA_KEY }}

build-all:
strategy:
fail-fast: false
matrix:
node: [12.0.0, 12.x, 14.x, 16.x, 17.x]
os: [windows-2019, ubuntu-18.04, ubuntu-20.04, macos-11]

runs-on: ${{ matrix.os }}

if: github.ref == 'refs/heads/develop'

steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Add msbuild to PATH
# we need msbuild tools for the `bigint-buffer` module
if: startsWith(matrix.os, 'windows-')
uses: microsoft/setup-msbuild@v1.0.2

- name: install node tools
# we don't need to install the windows-build-tools package, as we
# already have almost everything we need. We only need to install
# python 2.7. Also windows-build-tools@4 fails to install because some
# resources it downloads no longer exist, and windows-build-tools@5
# fails to install Python (it will wait on the python installer forever)
if: startsWith(matrix.os, 'windows-')
uses: actions/setup-python@v2
with:
python-version: "2.7"

- name: install node-gyp
if: startsWith(matrix.os, 'windows-')
run: npm install --global node-gyp@7.1.2

- name: Set node config to use python2.7
if: startsWith(matrix.os, 'windows-')
run: npm config set python python2.7

- name: Set node config to set msvs_version to 2019
if: startsWith(matrix.os, 'windows-')
run: npm config set msvs_version 2019 --global

- run: npm ci
- run: npm run tsc
- run: npm test
env:
FORCE_COLOR: 1
INFURA_KEY: ${{ secrets.TEST_INFURA_KEY }}
132 changes: 132 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: Release

on:
push:
branches: [alpha, beta, rc, master]

jobs:
release:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v1
with:
# use node 14 until we can evaluate using npm 7+ and lock file version 2
node-version: 14

- name: Set git identity
run: |
git config --global user.name 'Robot'
git config --global user.email 'robot@trufflesuite.com'
git remote set-url origin https://robot:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run installation
run: npm ci

- name: Test
run: npm test
env:
FORCE_COLOR: 1
INFURA_KEY: ${{ secrets.TEST_INFURA_KEY }}

- name: Set TAG for master to latest
if: ${{ github.ref == 'refs/heads/master' }}
run: |
echo "TAG=latest" >> $GITHUB_ENV
- name: Set TAG for non-master to the branch name
if: ${{ github.ref != 'refs/heads/master' }}
run: |
echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Update package versions for latest release (master)
if: ${{ env.TAG == 'latest' }}
run: $(npm bin)/lerna version patch --no-git-tag-version --no-push --yes --exact

- name: Update package versions for pre-releases
if: ${{ env.TAG != 'latest' }}
run: $(npm bin)/lerna version prerelease --no-git-tag-version --no-push --yes --exact --preid "$TAG"

- name: Add updated versions to git
run: git add .

- name: Run build
run: npm run build
env:
INFURA_KEY: ${{ secrets.INFURA_KEY }}

- name: Update documentation
run: |
npm run docs.build
git add docs/**
- name: Set VERSION
run: |
echo "VERSION=$(node -e 'console.log(require("./src/packages/ganache/package.json").version)')" >> $GITHUB_ENV
- name: Commit all staged changes
run: |
git commit -m "chore(release): publish v${VERSION}" -m "ganache@${VERSION}"
# TODO: sign the last commit and tag
- name: Tag the amended release commit
run: |
git tag -a "ganache@${VERSION}" -m "ganache@${VERSION}"
- name: Push changes to git
run: |
git push origin ${GITHUB_REF##*/}
git push origin --tags
- name: Set up auth for npm publish
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

# - name: Smoke test release
# TODO: set up verdaccio to mock npm https://verdaccio.org/

# this needs `--no-verify-access` until https://github.com/lerna/lerna/issues/2788 is fixed
- name: Release to npm
run: |
$(npm bin)/lerna publish from-package --yes --dist-tag ${TAG} --pre-dist-tag ${TAG} --no-verify-access
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# publish to docker and github packages
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: |
trufflesuite/ganache
ghcr.io/${{ github.repository}}
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
file: ./src/packages/ganache/Dockerfile
push: true
tags: ${{ format('trufflesuite/ganache:{0}, trufflesuite/ganache:v{1}', env.TAG, env.VERSION) }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
INFURA_KEY=${{ secrets.INFURA_KEY }}
16 changes: 7 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
node_modules
TODO
*.log
.eslintrc.js
.tern-project
.DS_Store
.tern-port
.vscode
build
npm-shrinkwrap.json.bak
test/testdb
.nyc_output/
.nyc_output
lerna-debug.log
npm-debug.log
src/**/*/lib
coverage
dist/
typings/
14 changes: 0 additions & 14 deletions .npmignore

This file was deleted.

6 changes: 6 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
engine-strict=false
save-exact=true
sign-git-commit=true
sign-git-tag=true
loglevel=error
fund=false
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v12.0.0
3 changes: 3 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@istanbuljs/nyc-config-typescript"
}
11 changes: 11 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.DS_Store
.vscode
.nyc_output
lerna-debug.log
npm-debug.log
src/**/*/lib
coverage
npm-shrinkwrap.json
docs/assets/js/ganache/*
docs/typedoc/**/*
docs/index.html
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"arrowParens": "avoid",
"trailingComma": "none"
}
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 2102c7d

Please sign in to comment.