From 6dfeb4b40115e3409f65adeb12a9ac2c7d74d258 Mon Sep 17 00:00:00 2001 From: ryanml Date: Mon, 17 May 2021 20:03:04 -0700 Subject: [PATCH] Repo standardization (#851) * Repo standardization - Adding GH actions workflow - Enforcing minimum Node version of 12 - Adding CODEOWNERS file - Adding basic .gitattributes file - Adding basic .editorconfig file * Adding MM devs to CODEOWNERS file --- .circleci/config.yml | 40 -------------------------------------- .editorconfig | 9 +++++++++ .gitattributes | 3 +++ .github/CODEOWNERS | 4 ++++ .github/workflows/test.yml | 29 +++++++++++++++++++++++++++ .nvmrc | 1 + package.json | 3 +++ 7 files changed, 49 insertions(+), 40 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .github/CODEOWNERS create mode 100644 .github/workflows/test.yml create mode 100644 .nvmrc diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 43b7e52f89..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,40 +0,0 @@ -aliases: - - &install-node-dependencies - | - npm install - -defaults: &defaults - working_directory: ~/contract-metadata - -version: 2 -jobs: - prep-deps: - <<: *defaults - docker: - - image: circleci/node:9 - steps: - - checkout - - run: *install-node-dependencies - - persist_to_workspace: - root: . - paths: - - node_modules - - test-unit: - <<: *defaults - docker: - - image: circleci/node:9 - steps: - - checkout - - attach_workspace: - at: . - - run: npm test - -workflows: - version: 2 - ful_test: - jobs: - - prep-deps - - test-unit: - requires: - - prep-deps diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..c6c8b36219 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..bf5e085f4d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +* text=auto + +yarn.lock linguist-generated=false diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..5d6374526e --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,4 @@ +# Lines starting with '#' are comments. +# Each line is a file pattern followed by one or more owners. + +* @xrn @MetaMask/devs diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..68e1101bfb --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +name: Test + +on: + push: + branches: [ master ] + pull_request: + +jobs: + test: + name: Test + runs-on: ubuntu-20.04 + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: yarn --frozen-lockfile + - run: yarn test + all-jobs-pass: + name: All jobs pass + runs-on: ubuntu-20.04 + needs: + - test + steps: + - run: echo "Great success!" diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000000..dae199aecb --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v12 diff --git a/package.json b/package.json index be938a7bed..30e552b997 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,9 @@ "registry": "https://registry.npmjs.org/", "access": "public" }, + "engines": { + "node": ">=12.0.0" + }, "scripts": { "test": "node test" },