diff --git a/.github/actions/install/action.yml b/.github/actions/install/action.yml new file mode 100644 index 0000000..f8cb857 --- /dev/null +++ b/.github/actions/install/action.yml @@ -0,0 +1,19 @@ +name: 'Install' +description: 'Setup Node.js and install dependencies' + +inputs: + node-version: + description: Node.js version + +runs: + using: composite + steps: + - name: Use Node.js ${{ inputs.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node-version }} + cache: 'yarn' + + - name: Install dependencies + shell: bash + run: yarn install --immutable diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 7370667..09a553f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -7,13 +7,22 @@ on: branches: [main] jobs: - build: + lint: runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/install + with: + node-version: 22.x + + - run: yarn lint + + build: + runs-on: ubuntu-latest strategy: matrix: node-version: [18.x, 20.x, 22.x] - steps: - uses: actions/checkout@v4 @@ -41,5 +50,4 @@ jobs: run: yarn playwright install --with-deps if: steps.playwright-cache.outputs.cache-hit != 'true' - - run: yarn lint - run: yarn test diff --git a/packages/svg/src/components.tsx b/packages/svg/src/components.tsx index c26d8e2..a29643b 100644 --- a/packages/svg/src/components.tsx +++ b/packages/svg/src/components.tsx @@ -2,7 +2,7 @@ import type { ResponderEvent, StyleProp } from '@react-universal/core'; import { createElement, styled } from '@react-universal/core'; -import { type AnyObject, isArray, isNumber, isString } from '@react-universal/utils'; +import { isArray, isNumber, isString } from '@react-universal/utils'; import { forwardRef } from 'react'; import type { CircleProps, diff --git a/vitest.config.ts b/vitest.config.ts index cfcddb8..3907d43 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -4,6 +4,9 @@ export default defineConfig({ resolve: { conditions: ['source'], }, + define: { + 'process.env': process.env, + }, test: { browser: { enabled: true,