From 32e14d8233fb9ac2e2550f885025ac571a76b4ba Mon Sep 17 00:00:00 2001 From: Christian Palazzo Date: Mon, 25 Mar 2024 21:34:49 +0100 Subject: [PATCH] feat(@agora): AG-35 basic workflow basic GitHub Actions workflow implementation --- .github/workflows/main.yml | 34 ++++++++++++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..85b9c6d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,34 @@ +name: CI + +on: + push: + branches: + - main + - develop + pull_request: + branches: + - main + - develop + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Use Node.js 20.x + uses: actions/setup-node@v2 + with: + node-version: 20.x + + - name: Install dependencies + run: npm install + + - name: Run linter + run: npm run lint + + - name: Run unit tests + run: npm run test-contracts diff --git a/package.json b/package.json index dc455b3..b886ea1 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "prepare": "husky prepare", "prepare-commit": "git-cz", "test": "test", - "test-contracts": "npx hardhat test" + "test-contracts": "npx hardhat test", + "lint": "npx lint-staged" }, "repository": { "type": "git",