From ddbf25791b9de7d39061ef9ccffcd5e1162df57a Mon Sep 17 00:00:00 2001 From: Alexey Churkin Date: Fri, 1 Nov 2024 17:38:43 +0100 Subject: [PATCH] Github Action --- .github/workflows/pipeline.yml | 22 ++++++++++++++++++++++ package.json | 7 +++---- 2 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/pipeline.yml diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 0000000..216929d --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,22 @@ +name: Lint and tests +on: [push] + +jobs: + build: + name: Test + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18 + registry-url: 'https://registry.npmjs.org' + cache: 'npm' + - run: npm ci + - run: npm run compile + + - name: Linter + run: npm run lint + + - name: Test + run: npm run test diff --git a/package.json b/package.json index 9233a9e..edb705b 100644 --- a/package.json +++ b/package.json @@ -15,10 +15,9 @@ "scripts": { "lint:fix": "prettier --write 'src/**/*.{js,ts}' 'test/**/*.{js,ts}' && tslint --fix --config tslint.json --project tsconfig.json", "lint": "tslint --config tslint.json --project tsconfig.json", - "test": "mocha --exit --recursive 'test/**/*.test.ts'", - "build": "npm-run-all clean build-*", - "build-0-aux": "npx hardhat build", - "build-1-ts": "tsc", + "test": "hardhat test", + "prebuild": "npm run clean", + "build": "npx hardhat compile && npx hardhat build && tsc", "clean": "rm -rf ./dist", "prepare": "npm run build" },