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

Move eslint to github action, remove from precommit #538

Merged
merged 1 commit into from
Dec 17, 2024
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
43 changes: 23 additions & 20 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Ibutsu tests
on:
push:
branches:
- master
- main
pull_request:
types: ["opened", "synchronize", "reopened"]
create:
Expand All @@ -12,21 +12,36 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- name: Install dependencies
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all --verbose
lint-test-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: 'frontend/.nvmrc'
cache: 'yarn'
cache-dependency-path: 'frontend/yarn.lock'
- run: yarn install --frozen-lockfile
working-directory: ./frontend
- run: yarn lint
working-directory: ./frontend
- run: yarn test
working-directory: ./frontend
test-backend:
runs-on: ubuntu-latest
needs: lint
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11"] # five is broken on 3.11 - celery update needed "3.11.0-alpha - 3.11"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install backend dependencies with Python ${{ matrix.python-version }}
Expand All @@ -37,18 +52,6 @@ jobs:
- name: Run backend tests
working-directory: ./backend
run: pytest
test-frontend:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Install frontend dependencies
working-directory: ./frontend
run: yarn install
- name: Run frontend tests
working-directory: ./frontend
run: yarn test

build-backend:
runs-on: ubuntu-latest
Expand All @@ -57,7 +60,7 @@ jobs:
matrix:
app: [backend, scheduler, worker]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build image ${{ matrix.app }}
uses: redhat-actions/buildah-build@v2
with:
Expand All @@ -68,9 +71,9 @@ jobs:

build-frontend:
runs-on: ubuntu-latest
needs: test-frontend
needs: lint-test-frontend
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build frontend image
uses: redhat-actions/buildah-build@v2
with:
Expand Down
20 changes: 1 addition & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
- id: debug-statements

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
rev: v0.8.2
hooks:
- id: ruff
args:
Expand All @@ -28,21 +28,3 @@ repos:
rev: v2.12.1b3
hooks:
- id: hadolint

## ES
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.13.0
hooks:
- id: eslint
additional_dependencies:
- eslint@7
- eslint-plugin-cypress
- eslint-plugin-react
- eslint-plugin-import
- "@babel/eslint-parser"
- "@babel/plugin-transform-class-properties"
- "@babel/plugin-transform-private-methods"
- "@babel/plugin-syntax-jsx"
- "@babel/preset-flow"
- "@babel/core"
- "react"
1 change: 1 addition & 0 deletions frontend/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18
Loading