Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace CircleCI with Github Actions #35

Merged
merged 3 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .circleci/config.yml

This file was deleted.

20 changes: 8 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,28 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
node-version-file: .node-version
cache: 'yarn'

- name: Install dependencies
uses: borales/actions-yarn@v4
uses: borales/actions-yarn@v5
with:
cmd: install

- name: Lint
uses: borales/actions-yarn@v4
with:
cmd: lint:all

- name: Build
uses: borales/actions-yarn@v4
uses: borales/actions-yarn@v5
with:
cmd: build

- name: Release
uses: borales/actions-yarn@v4
uses: borales/actions-yarn@v5
with:
cmd: run release
cmd: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test

on:
pull_request:
branches:
- main

jobs:
test:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: 'yarn'

- name: Install dependencies
uses: borales/actions-yarn@v5
with:
cmd: install

- name: Lint
uses: borales/actions-yarn@v5
with:
cmd: lint:all

- name: Run Vite tests
uses: borales/actions-yarn@v5
with:
cmd: test
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.14.0
23.3.0
13 changes: 5 additions & 8 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,11 @@ import jsxA11yPlugin from 'eslint-plugin-jsx-a11y'
import jsoncPlugin from 'eslint-plugin-jsonc'
import tsParser from '@typescript-eslint/parser'
import jsoncParser from 'jsonc-eslint-parser'
// import stylelint from 'eslint-plugin-stylelint'

const ignores = [
'app/javascript/**/*',
'app/frontend/types/serializers/**/*',
'app/frontend/lib/routes/urlParams.ts',
'app/frontend/lib/routes/routes.js',
'app/frontend/lib/routes/routes.d.ts',
'tmp/**/*',
'public/**/*',
'dist/**/*',
'.vscode/**/*',
'.yarn/**/*',
]

export default [
Expand Down Expand Up @@ -53,6 +48,8 @@ export default [
'@stylistic': stylistic,
},
rules: {
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'@stylistic/indent': ['error', 'tab', {
SwitchCase: 1,
VariableDeclarator: 'first',
Expand Down
2 changes: 1 addition & 1 deletion tests/components/ContextTest.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect } from 'react'
import { useEffect } from 'react'
import { NestedObject, useForm, UseFormProps } from '../../src'
import CircularJSON from 'circular-json'

Expand Down
2 changes: 0 additions & 2 deletions tests/formComponent.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import { fireEvent, render, screen } from '@testing-library/react'
import '@testing-library/jest-dom'
import {
Expand All @@ -11,7 +10,6 @@ import { get } from 'lodash'
import ContextTest from './components/ContextTest'
import { multiRootData, singleRootData } from './components/data'


describe('Form Component', () => {
describe('When not passed a data object', () => {
it('builds the data object from inputs', () => {
Expand Down
1 change: 0 additions & 1 deletion tests/nestedFields.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import { render, screen } from '@testing-library/react'
import '@testing-library/jest-dom'

Expand Down
1 change: 0 additions & 1 deletion tests/useDynamicInputs.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import { render, screen, act } from '@testing-library/react'
import '@testing-library/jest-dom'
import {
Expand Down
1 change: 0 additions & 1 deletion tests/useInertiaInput.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import { fireEvent, render, screen } from '@testing-library/react'
import '@testing-library/jest-dom'
import { Form, Input } from '../src'
Expand Down
Loading