From d4c7057fff07a4138170447477d424e981c31a57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Uhl=C3=AD=C5=99?= Date: Wed, 24 Jan 2024 11:35:48 +0100 Subject: [PATCH] ci: check formatting --- .github/workflows/ci.yml | 8 ++++++++ package.json | 1 + 2 files changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e0f569..ea1ac9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,14 @@ name: CI on: [push, pull_request] jobs: + formatting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + - run: npm install + - run: npm run format:check + test: runs-on: ubuntu-latest steps: diff --git a/package.json b/package.json index 0ea66dc..062f110 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "start": "hardhat node --export deployment-localhost.json", "compile": "hardhat compile", "format": "prettier --write contracts/**/*.sol test/**/*.js", + "format:check": "prettier --check contracts/**/*.sol test/**/*.js", "lint": "solhint contracts/**.sol", "deploy": "hardhat deploy" },