From 266e05f51da6fc1e7bb349902702148cbbf182a7 Mon Sep 17 00:00:00 2001 From: Cody A Price Date: Thu, 18 Jul 2024 14:10:37 -0500 Subject: [PATCH] replace prettier-check with autofix, update readme --- .github/workflows/autofix.yml | 26 ++++++++++++++++++++++++ .github/workflows/prettier-check.yml | 30 ---------------------------- README.md | 12 +++++++++++ 3 files changed, 38 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/autofix.yml delete mode 100644 .github/workflows/prettier-check.yml diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml new file mode 100644 index 000000000..09274b8a9 --- /dev/null +++ b/.github/workflows/autofix.yml @@ -0,0 +1,26 @@ +name: autofix.ci # needed to securely identify the workflow + +on: + pull_request: + +permissions: + contents: read + +jobs: + autofix: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup pnpm + uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + - name: Install dependencies + run: pnpm install + - name: Fix formatting + run: pnpm run fmt + - name: Apply fixes + uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a + with: + commit-message: 'ci: apply automated fixes' diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/prettier-check.yml deleted file mode 100644 index 799c93036..000000000 --- a/.github/workflows/prettier-check.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Prettier Check - -on: - pull_request: - types: [opened, synchronize, reopened] - -jobs: - prettier-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Setup pnpm - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - registry-url: "https://registry.npmjs.org" - cache: 'pnpm' - - name: Install dependencies - run: pnpm install --frozen-lockfile - - name: Check formatting - run: pnpm run fmt:check - - name: Run the formatter if there were issues - if: failure() - run: pnpm run fmt - - name: Push changes - uses: stefanzweifel/git-auto-commit-action@v4 - if: failure() - with: - commit_message: Format code with prettier diff --git a/README.md b/README.md index 597850933..f208a51f8 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,16 @@ Prerequisites required: We use [direnv](https://direnv.net/) to assist you with setting up all of the required tooling. +
+ Prefer to install and manage the tooling yourself? + +1. Install [nvm](https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating) or your node version manager of choice. +2. Ensure that `node 20` is installed. With `nvm`, run `nvm install`. +3. Enable `pnpm` with `corepack`: `corepack enable pnpm` +4. Install `pnpm` with `corepack`: `corepack install` +5. Install project dependencies with `pnpm`: `pnpm install` +
+ First, install `direnv`: | OS | command | @@ -27,6 +37,8 @@ First, install `direnv`: For all other OSes, see the [direnv installation guide](https://direnv.net/docs/installation.html). +Don't forget to [set up direnv integration with your shell](https://direnv.net/docs/hook.html). + Next, clone the repo and move into the directory: ```sh