From bf5fb30f04eaf1dc52d26bfeaa8abdc7bfd240f6 Mon Sep 17 00:00:00 2001 From: KID-joker Date: Sun, 24 Nov 2024 09:19:48 +0800 Subject: [PATCH 1/2] ci: lint --- .github/workflows/automated-lint.yaml | 39 ++++++++++++++++++++++++++ .github/workflows/automated-tests.yaml | 4 +-- 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/automated-lint.yaml diff --git a/.github/workflows/automated-lint.yaml b/.github/workflows/automated-lint.yaml new file mode 100644 index 0000000..da7288c --- /dev/null +++ b/.github/workflows/automated-lint.yaml @@ -0,0 +1,39 @@ +name: Automated Lint + +on: + push: + branches: [main, develop] + pull_request: + branches: [main, develop] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 30 + strategy: + matrix: + node-version: [22] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + cache-dependency-path: pnpm-lock.yaml + node-version: ${{ matrix.node-version }} + check-latest: true + cache: npm + + - name: Install dependencies + run: npx pnpm install + + - name: Check linting + run: npx pnpm lint + + - name: Check type + run: npx pnpm typecheck diff --git a/.github/workflows/automated-tests.yaml b/.github/workflows/automated-tests.yaml index 13ca61a..e133dcd 100644 --- a/.github/workflows/automated-tests.yaml +++ b/.github/workflows/automated-tests.yaml @@ -1,4 +1,4 @@ -# This workflow will do a clean install of node dependencies, check the linting and run tests across different versions of node. +# This workflow will do a clean install of node dependencies, run tests across different versions of node. name: Automated Tests @@ -82,4 +82,4 @@ jobs: run: pnpm install --prod - name: Run tests - run: pnpm test \ No newline at end of file + run: pnpm test From d912c61da95c43c0003432f315d9488f133f9008 Mon Sep 17 00:00:00 2001 From: KID-joker Date: Sun, 24 Nov 2024 09:26:10 +0800 Subject: [PATCH 2/2] ci: rename --- .github/workflows/automated-lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/automated-lint.yaml b/.github/workflows/automated-lint.yaml index da7288c..7a31d7c 100644 --- a/.github/workflows/automated-lint.yaml +++ b/.github/workflows/automated-lint.yaml @@ -10,7 +10,7 @@ permissions: contents: read jobs: - test: + lint: runs-on: ubuntu-latest timeout-minutes: 30 strategy: