Skip to content

Commit

Permalink
Merge pull request #13 from nomiclabs/master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
wighawag authored Oct 24, 2020
2 parents a3f6269 + 23b0450 commit cff93b6
Show file tree
Hide file tree
Showing 3,014 changed files with 127,017 additions and 60,789 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.sol linguist-language=Solidity
# prevent github actions to checkout files with crlf line endings
* -text
164 changes: 66 additions & 98 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- master
- development
- 2.0
pull_request:
branches:
- "*"
Expand All @@ -18,30 +19,26 @@ jobs:
with:
node-version: 10
- uses: actions/checkout@v2

- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Get date
id: get-date
run: echo "::set-output name=date::$(date -u +%Y-%m-%d)"
- name: Get node exact version
id: get-node-version
run: echo "::set-output name=version::$(node --version)"
- uses: actions/cache@v1
- uses: actions/cache@v2
id: cache
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ steps.get-node-version.outputs.version }}-date-${{ steps.get-date.outputs.date }}-${{ hashFiles('**/package.json') }}

path: |
node_modules
packages/*/node_modules
packages/hardhat-core/test/internal/hardhat-network/stack-traces/compilers
key: ${{ runner.os }}-node-10-${{ hashFiles('yarn.lock') }}
- name: Install node-gyp-cache
run: |
npm install -g node-gyp-cache
npm config set node_gyp node-gyp-cache
yarn global add node-gyp-cache
yarn config set node_gyp node-gyp-cache
- name: Install
run: npm install
run: yarn --frozen-lockfile
- name: Clean
run: yarn clean
- name: Build
run: yarn build
- name: lint
run: npm run lint
run: yarn lint
- name: Check dependency versions
run: node scripts/check-dependencies.js

Expand All @@ -53,30 +50,24 @@ jobs:
with:
node-version: 10
- uses: actions/checkout@v2

- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Get date
id: get-date
run: echo "::set-output name=date::$(date -u +%Y-%m-%d)"
- name: Get node exact version
id: get-node-version
run: echo "::set-output name=version::$(node --version)"
- uses: actions/cache@v1
- uses: actions/cache@v2
id: cache
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ steps.get-node-version.outputs.version }}-date-${{ steps.get-date.outputs.date }}-${{ hashFiles('**/package.json') }}

path: |
node_modules
packages/*/node_modules
packages/hardhat-core/test/internal/hardhat-network/stack-traces/compilers
key: ${{ runner.os }}-node-10-${{ hashFiles('yarn.lock') }}}
- name: Install node-gyp-cache
run: |
npm install -g node-gyp-cache
npm config set node_gyp node-gyp-cache
yarn global add node-gyp-cache
yarn config set node_gyp node-gyp-cache
- name: Install
run: npm install
run: yarn --frozen-lockfile
- name: Clean
run: yarn clean
- name: Build tests
run: npm run build-test
run: yarn build-test

test_windows:
name: Test on Windows with Node 10
Expand All @@ -86,30 +77,13 @@ jobs:
with:
node-version: 10
- uses: actions/checkout@v2

- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Get date
id: get-date
run: echo "::set-output name=date::$(date -u +%Y-%m-%d)"
- name: Get node exact version
id: get-node-version
run: echo "::set-output name=version::$(node --version)"
- uses: actions/cache@v1
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ steps.get-node-version.outputs.version }}-date-${{ steps.get-date.outputs.date }}-${{ hashFiles('**/package.json') }}

# - name: Install node-gyp-cache
# run: |
# npm install -g node-gyp-cache
# npm config set node_gyp node-gyp-cache
- name: Install
run: npm install
run: yarn --frozen-lockfile
- name: Run tests
run: npm run test
env:
INFURA_URL: ${{ secrets.INFURA_URL }}
ALCHEMY_URL: ${{ secrets.ALCHEMY_URL }}
run: yarn test

test_macos:
name: Test on MacOS with Node 10
Expand All @@ -119,30 +93,27 @@ jobs:
with:
node-version: 10
- uses: actions/checkout@v2

- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Get date
id: get-date
run: echo "::set-output name=date::$(date -u +%Y-%m-%d)"
- name: Get node exact version
id: get-node-version
run: echo "::set-output name=version::$(node --version)"
- uses: actions/cache@v1
- uses: actions/cache@v2
id: cache
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ steps.get-node-version.outputs.version }}-date-${{ steps.get-date.outputs.date }}-${{ hashFiles('**/package.json') }}

path: |
node_modules
packages/*/node_modules
packages/hardhat-core/test/internal/hardhat-network/stack-traces/compilers
key: ${{ runner.os }}-node-10-${{ hashFiles('yarn.lock') }}}
- name: Install node-gyp-cache
run: |
npm install -g node-gyp-cache
npm config set node_gyp node-gyp-cache
yarn global add node-gyp-cache
yarn config set node_gyp node-gyp-cache
- name: Install
run: npm install
run: yarn --frozen-lockfile
- name: Clean
run: yarn clean
- name: Run tests
run: npm run test
env:
INFURA_URL: ${{ secrets.INFURA_URL }}
ALCHEMY_URL: ${{ secrets.ALCHEMY_URL }}
run: yarn test

test_linux:
name: Test on Linux with Node ${{ matrix.node }}
Expand All @@ -157,27 +128,24 @@ jobs:
- name: install vyper
run: docker pull ethereum/vyper:0.1.0b10
- uses: actions/checkout@v2

- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Get date
id: get-date
run: echo "::set-output name=date::$(date -u +%Y-%m-%d)"
- name: Get node exact version
id: get-node-version
run: echo "::set-output name=version::$(node --version)"
- uses: actions/cache@v1
- uses: actions/cache@v2
id: cache
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ steps.get-node-version.outputs.version }}-date-${{ steps.get-date.outputs.date }}-${{ hashFiles('**/package.json') }}

path: |
node_modules
packages/*/node_modules
packages/hardhat-core/test/internal/hardhat-network/stack-traces/compilers
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}}
- name: Install node-gyp-cache
run: |
npm install -g node-gyp-cache
npm config set node_gyp node-gyp-cache
yarn global add node-gyp-cache
yarn config set node_gyp node-gyp-cache
- name: Install
run: npm install
run: yarn --frozen-lockfile
- name: Clean
run: yarn clean
- name: Run tests
run: npm run test
env:
INFURA_URL: ${{ secrets.INFURA_URL }}
ALCHEMY_URL: ${{ secrets.ALCHEMY_URL }}
run: yarn test
27 changes: 27 additions & 0 deletions .github/workflows/LATEST_DEPENDENCY_VERSIONS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: LATEST_DEPENDENCY_VERSIONS

on:
schedule:
- cron: '0 0/8 * * *'

jobs:
test-without-yarn-lock:
name: Test without yarn.lock
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
with:
node-version: 10
- name: install vyper
run: docker pull ethereum/vyper:0.1.0b10
- uses: actions/checkout@v2
- name: Install node-gyp-cache
run: |
yarn global add node-gyp-cache
yarn config set node_gyp node-gyp-cache
- name: Delete yarn.lock
run: "rm yarn.lock"
- name: Install
run: yarn
- name: Run tests
run: yarn test
9 changes: 2 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ myproject
/node_modules
/.idea
*.tsbuildinfo
package-lock.json

.DS_Store

# Below is Github's node gitignore template, except for dotenv's entries as it's used by mocha to pass flags to ts-node,
# and ignoring the node_modules part, as it'd ignore every node_modules, and we have some for testing
# Below is Github's node gitignore template,
# ignoring the node_modules part, as it'd ignore every node_modules, and we have some for testing

# Logs
logs
Expand Down Expand Up @@ -71,10 +70,6 @@ typings/
# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
#.env
#.env.test

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

Expand Down
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

Loading

0 comments on commit cff93b6

Please sign in to comment.