Skip to content

Commit

Permalink
add CI and update eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
melkent committed Nov 1, 2024
1 parent 80b56ca commit 9992bf6
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will run on a pull request to 'main'

name: build-test-on-pull-request

on:
pull_request:
branches:
- 'main'

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install frontend dependecies
- run: |
cd frontend
npm ci
- name: Build frontend
- run: |
cd frontend
npm run build --if-present
# - name: Test frontend
# - run: |
# cd frontend
# npm test -- --coverage
41 changes: 41 additions & 0 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will run for pushes to all branches

name: build-test-on-push

on:
push:
branches:
- '*'

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install frontend dependecies
- run: |
cd frontend
npm ci
- name: Build frontend
- run: |
cd frontend
npm run build --if-present
# - name: Test frontend
# - run: |
# cd frontend
# npm test -- --coverage
10 changes: 10 additions & 0 deletions frontend/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,14 @@ export default [
],
},
},
{
overrides: [
{
files: ['**/__tests__/**/*.{js,jsx,ts,tsx}'],
env: {
jest: true
}
}
]
},
]

0 comments on commit 9992bf6

Please sign in to comment.