From 06e1fbf794d7cb673880f50c18f936e798911f96 Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 12 Jan 2024 14:59:04 +0100 Subject: [PATCH] [#146] Add github worflow for global fmt checks --- .github/workflows/ci.yml | 15 +++++++++++++++ .prettierignore | 2 +- package.json | 4 ++-- 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..dec0fc9db --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,15 @@ +name: safe-modules +on: [push] + +jobs: + checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: 20.x + cache: npm + cache-dependency-path: package-lock.json + - run: npm ci + - run: npm run fmt:global-check diff --git a/.prettierignore b/.prettierignore index 6b73ae79a..df3b29514 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1 @@ -modules/** \ No newline at end of file +modules/** diff --git a/package.json b/package.json index 981c587e3..89d50a66b 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ "modules/*" ], "scripts": { - "fmt": "prettier --write .", - "fmt:check": "prettier --check ." + "fmt:global": "prettier --write .", + "fmt:global-check": "prettier --check ." }, "repository": { "type": "git",