From 0fcc6f5d403a15d1a43ef40c51a3aa457d4d0bc4 Mon Sep 17 00:00:00 2001 From: Alex <49969959+alexzhang1030@users.noreply.github.com> Date: Sun, 17 Dec 2023 22:53:50 +0800 Subject: [PATCH] workflow: ci and pr template (#74) Co-authored-by: Arlo --- .github/PULL_REQUEST_TEMPLATE.md | 21 ++++++++++++++++++ .github/workflows/autofix.yml | 38 ++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/autofix.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..bfcabad0 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,21 @@ + + +### Description + + + +### Linked Issues + +### Additional context + + diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml new file mode 100644 index 00000000..26954288 --- /dev/null +++ b/.github/workflows/autofix.yml @@ -0,0 +1,38 @@ +name: autofix.ci + +on: + push: + branches: + - main + + pull_request: + branches: + - main + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Install pnpm + uses: pnpm/action-setup@v2 + + - name: Set node + uses: actions/setup-node@v3 + with: + node-version: lts/* + + - name: Setup + run: npm i -g @antfu/ni + + - name: Install + run: nci + + - name: Build + run: nr build + + - name: Lint + run: nr lint --fix + + - uses: autofix-ci/action@v1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..1545835a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: + push: + branches: + - main + + pull_request: + branches: + - main + +jobs: + ci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v2 + + - name: Set node + uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: Setup ni + run: npm i -g @antfu/ni + + - name: Install + run: nci + + - name: Build + run: nr build + + - name: Lint + run: nr lint