From 5160c2f363dd6cfb24b117c007da794f1dbb18bd Mon Sep 17 00:00:00 2001 From: Gabriel Montes Date: Thu, 28 Mar 2024 15:52:01 -0400 Subject: [PATCH] Add GitHub Action workflows to test and lint --- .github/workflows/lint.yml | 17 +++++++++++++++++ .github/workflows/test.yml | 22 ++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..89aa529 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,17 @@ +name: Lint + +on: + push: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + - run: npm ci + - run: npm run lint + - run: npm run format:check + - run: npm run deps:check diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..c80e775 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,22 @@ +name: Test + +on: + pull_request: + branches: [ $default-branch ] + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + - run: npm ci + - run: npm run test + - run: npm run test:e2e + env: + BASE_NODE_URL: ${{ vars.BASE_NODE_URL }} + MNEMONIC: ${{ vars.MNEMONIC }} + - run: npm run build