From 3cc64fb0bf410d5b01a1d283ff992f427ce4af20 Mon Sep 17 00:00:00 2001 From: Adam Gall Date: Tue, 22 Oct 2024 11:15:28 -0400 Subject: [PATCH] Add a github action for linting and prettying --- .github/workflows/code-syntax.yml | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/code-syntax.yml diff --git a/.github/workflows/code-syntax.yml b/.github/workflows/code-syntax.yml new file mode 100644 index 0000000..e70a1ce --- /dev/null +++ b/.github/workflows/code-syntax.yml @@ -0,0 +1,37 @@ +name: Code Syntax +on: + push: + branches: + - develop + pull_request: +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up node + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + - name: Install dependencies + run: npm ci + - name: Compile contracts + run: npm run compile + - name: Run linter + run: npm run lint:check + pretty: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up node + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + - name: Install dependencies + run: npm ci + - name: Compile contracts + run: npm run compile + - name: Run prettier + run: npm run pretty:check