From a2400cf1d16bb17794900e0b150dabfc34efeebb Mon Sep 17 00:00:00 2001 From: Samuele Musiani Date: Tue, 9 Jul 2024 23:28:38 +0200 Subject: [PATCH] check formatting and build on push --- .github/workflows/build.yaml | 23 +++++++++++++++++++++++ .github/workflows/formatting.yaml | 22 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/build.yaml create mode 100644 .github/workflows/formatting.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..f873637 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,23 @@ +name: Build + +on: + push + +jobs: + build-check: + runs-on: ubuntu-latest + steps: + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Checkout the repo + uses: actions/checkout@v4 + + - name: Install npm-run-all + run: npm install npm-run-all + + - name: Check formatting + run: npm run build + diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml new file mode 100644 index 0000000..48d8d68 --- /dev/null +++ b/.github/workflows/formatting.yaml @@ -0,0 +1,22 @@ +name: Formatting + +on: + push + +jobs: + format-check: + runs-on: ubuntu-latest + steps: + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Checkout the repo + uses: actions/checkout@v4 + + - name: Install prettier + run: npm install --save-dev --save-exact prettier + + - name: Check formatting + run: npx prettier --check src/