Skip to content

Commit

Permalink
Add install action and run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
efoken committed Dec 6, 2024
1 parent a1b4139 commit 07edbee
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
19 changes: 19 additions & 0 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
@@ -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
14 changes: 11 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion packages/svg/src/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ export default defineConfig({
resolve: {
conditions: ['source'],
},
define: {
'process.env': process.env,
},
test: {
browser: {
enabled: true,
Expand Down

0 comments on commit 07edbee

Please sign in to comment.