diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63b81552..61bf586a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Node CI +name: CI on: [push, pull_request] @@ -10,19 +10,19 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node_version: [16.x, 14.x] + node_version: [20] os: [ubuntu-latest, windows-latest, macOS-latest] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node_version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node_version }} - run: echo ${{github.ref}} - - run: npm install --legacy-peer-deps - - run: yarn run lint - - run: yarn run tsc - - run: yarn run build + - uses: oven-sh/setup-bun@v2 + - run: bun install + - run: bun run lint + - run: bun run build env: CI: true PROGRESS: none diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 705b30e3..00000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: "CodeQL" - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - schedule: - - cron: "48 12 * * 2" - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ javascript ] - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - queries: +security-and-quality - - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 - with: - category: "/language:${{ matrix.language }}" diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index d1457535..bb6d518d 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -9,19 +9,13 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: Use Node.js 16.x - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - name: Use Node.js 20 + uses: actions/setup-node@v4 with: - node-version: 16.x + node-version: 20 - run: echo ${{github.ref}} - - run: curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7 - - run: pnpm config set store-dir ~/.pnpm-store - - run: pnpm install --strict-peer-dependencies=false - - run: yarn run test:coverage - env: - CI: true - PROGRESS: none - NODE_ENV: test - NODE_OPTIONS: --max_old_space_size=4096 - - run: bash <(curl -s https://codecov.io/bash) + - uses: oven-sh/setup-bun@v2 + - run: bun install + - run: bun run test:coverage + - uses: codecov/codecov-action@v5 diff --git a/.github/workflows/pnpm.yml b/.github/workflows/pnpm.yml deleted file mode 100644 index 63bb2e45..00000000 --- a/.github/workflows/pnpm.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Node pnpm CI - -on: [push, pull_request] - -permissions: - contents: read - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - node_version: [16.x] - os: [ubuntu-latest, windows-latest, macOS-latest] - steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node_version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node_version }} - - run: echo ${{github.ref}} - - run: curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7 - - run: pnpm config set store-dir ~/.pnpm-store - - run: pnpm install --strict-peer-dependencies=false - - run: pnpm run lint - - run: pnpm run tsc - - run: pnpm run build - - run: pnpm run test - env: - CI: true - PROGRESS: none - NODE_ENV: test - NODE_OPTIONS: --max_old_space_size=4096 diff --git a/.github/workflows/preview-build.yml b/.github/workflows/preview-build.yml index d8667a5d..ea65e05b 100644 --- a/.github/workflows/preview-build.yml +++ b/.github/workflows/preview-build.yml @@ -12,18 +12,17 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - name: build run: | yarn - yarn add umi-plugin-pro --save yarn build - name: upload dist artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: dist path: dist/ @@ -35,7 +34,7 @@ jobs: - name: Upload PR number if: ${{ always() }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: pr path: ./pr-id.txt diff --git a/.github/workflows/preview-deploy.yml b/.github/workflows/preview-deploy.yml index e9a699ff..35cfb5ba 100644 --- a/.github/workflows/preview-deploy.yml +++ b/.github/workflows/preview-deploy.yml @@ -19,7 +19,7 @@ jobs: if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' steps: - name: download pr artifact - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@v4 with: workflow: ${{ github.event.workflow_run.workflow_id }} name: pr @@ -29,7 +29,7 @@ jobs: run: echo "::set-output name=id::$(