diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml new file mode 100644 index 0000000..c829cc7 --- /dev/null +++ b/.github/workflows/autofix.yml @@ -0,0 +1,35 @@ +name: autofix.ci + +on: + push: + branches: + - main + + pull_request: + branches: + - main + +jobs: + autofix: + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + + - name: Set node LTS ✨ + uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: Install Dependencies 📦️ + run: pnpm i + + - name: Lint + run: pnpm lint:fix + + - uses: autofix-ci/action@v1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd9d383..4172da2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,48 +10,57 @@ on: - main jobs: - lint: + typecheck: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set node - uses: actions/setup-node@v3 + - name: Checkout 🛎️ + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + + - name: Set node LTS ✨ + uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: lts/* + cache: pnpm - - name: Setup - run: npm i -g @antfu/ni + - name: Install Dependencies 📦️ + run: pnpm i - - name: Install - run: nci + - name: Build + run: pnpm build - - name: Lint - run: nr lint + - name: Typecheck + run: pnpm typecheck test: runs-on: ${{ matrix.os }} strategy: matrix: - node: [20.x, 18.x] + node: [lts/*] os: [ubuntu-latest, windows-latest, macos-latest] fail-fast: false steps: - - uses: actions/checkout@v3 + - name: Checkout 🛎️ + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + - name: Set node ${{ matrix.node }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} + cache: pnpm - - name: Setup - run: npm i -g @antfu/ni - - - name: Install - run: nci + - name: Install Dependencies 📦️ + run: pnpm i - name: Build - run: nr build + run: pnpm build - name: Test - run: nr test + run: pnpm test