Quellcode durchsuchen

ci: setup commands and added ci for testing build (#4)

* ci: setup commands and added ci for testing build

* fix: typo in ci

* Update tests.yml

* Update tests.yml

* fix: config

* ci: setup testing ci

* ci: fix workflow

Co-authored-by: Kristjan Kosic <kristjan@protokol.com>
KovacZan vor 4 Jahren
Ursprung
Commit
0d85f27f8c
5 geänderte Dateien mit 45 neuen und 374 gelöschten Zeilen
  1. 35 0
      .github/workflows/tests.yml
  2. 1 0
      .gitignore
  3. 4 4
      hardhat.config.ts
  4. 2 370
      package-lock.json
  5. 3 0
      package.json

+ 35 - 0
.github/workflows/tests.yml

@@ -0,0 +1,35 @@
+name: TESTS
+
+on:
+  push:
+    branches:
+      - "main"
+      - "develop"
+  pull_request:
+    types: [ready_for_review, synchronize, opened]
+
+jobs:
+  tests:
+    name: TESTS
+    runs-on: ubuntu-latest
+
+    strategy:
+      matrix:
+        node-version: [14.x]
+
+    steps:
+      - uses: actions/checkout@v2
+
+      - name: Use Node.js ${{ matrix.node-version }}
+        uses: actions/setup-node@v2
+        with:
+          node-version: ${{ matrix.node-version }}
+
+      - name: Install
+        run: npm install
+
+      - name: Compile
+        run: npm run compile
+
+      - name: Test
+        run: npm run test

+ 1 - 0
.gitignore

@@ -83,6 +83,7 @@ captures/
 .idea/modules.xml
 # Comment next line if keeping position of elements in Navigation Editor is relevant for you
 .idea/navEditor.xml
+.idea
 
 # Keystore files
 # Uncomment the following lines if you do not want to check your keystore files in.

+ 4 - 4
hardhat.config.ts

@@ -53,10 +53,10 @@ module.exports = {
         },
         rinkeby: {
             url: RINKEBY_RPC_URL,
-            accounts: [PRIVATE_KEY],
-            // accounts: {
-            //    mnemonic: MNEMONIC,
-            // },
+            // accounts: [PRIVATE_KEY],
+            accounts: {
+                mnemonic: MNEMONIC,
+            },
             saveDeployments: true,
         },
         ganache: {

Datei-Diff unterdrückt, da er zu groß ist
+ 2 - 370
package-lock.json


+ 3 - 0
package.json

@@ -3,7 +3,10 @@
     "version": "1.0.0",
     "description": "",
     "scripts": {
+        "compile": "hardhat compile",
         "test": "hardhat test",
+        "deploy": "hardhat deploy",
+        "node": "hardhat node",
         "lint:fix": "prettier --write 'scripts/**/*.{js,ts}' 'test/**/*.{js,ts}' 'tasks/**/*.{js,ts}' && tslint --fix --config tslint.json --project tsconfig.json && solhint contracts/**/*.sol",
         "lint": "tslint --config tslint.json --project tsconfig.json && solhint contracts/**/*.sol",
         "format": "prettier --check \"**/*.{ts,js,sol}\"",

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.