From 5580f67442d682c043d9c735a172b85ec4c648d6 Mon Sep 17 00:00:00 2001 From: Sarah Wang <55766946+sarahsonder@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:32:53 -0400 Subject: [PATCH] Add autofix.ci to CI workflow (#46) --- .github/workflows/autofix-ci.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 19 ------------------- CHANGELOG.md | 1 + 3 files changed, 31 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/autofix-ci.yml diff --git a/.github/workflows/autofix-ci.yml b/.github/workflows/autofix-ci.yml new file mode 100644 index 0000000..790fd5f --- /dev/null +++ b/.github/workflows/autofix-ci.yml @@ -0,0 +1,30 @@ +name: autofix.ci +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + push: + branches: + - master +permissions: + contents: read + +jobs: + prettier: + runs-on: ubuntu-22.04 + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Set up node and cache packages + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: npm + - name: Install npm packages + run: npm ci + - name: Run prettier + run: npx prettier . --write + - name: Commit changes + uses: autofix-ci/action@d3e591514b99d0fca6779455ff8338516663f7cc + with: + commit_message: Apply formatting changes + branch: ${{ github.head_ref }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ae6b4b..bfccc0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,25 +7,6 @@ on: - master jobs: - prettier: - runs-on: ubuntu-22.04 - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - name: Set up node and cache packages - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: npm - - name: Install npm packages - run: npm ci - - name: Run prettier - run: npx prettier . --write - # - name: Commit changes - # uses: stefanzweifel/git-auto-commit-action@v4 - # with: - # commit_message: Apply formatting changes - # branch: ${{ github.head_ref }} jest: if: github.event.pull_request.draft == false runs-on: ubuntu-22.04 diff --git a/CHANGELOG.md b/CHANGELOG.md index 26c5eab..9d80328 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Removed unused imports in `demo_C.js`. - Added type interfaces and type annotations to `style.ts`. - Added `DrawnEntity` type annotations to source code files. +- Added `autofix.ci` to the CI workflow. ## [0.1.0] - 2024-04-16