Skip to content

Commit

Permalink
fix: Add TypeScript compilation step to frontend workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
openhands-agent committed Dec 1, 2024
1 parent f3db39c commit d635c69
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/frontend-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint Frontend

on:
pull_request:
paths:
- 'frontend/**'
- '.github/workflows/frontend-lint.yml'

jobs:
lint:
name: Lint frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: TypeScript compilation
working-directory: frontend
run: npm run tsc
- name: Lint
working-directory: frontend
run: npm run lint
31 changes: 31 additions & 0 deletions .github/workflows/frontend-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Frontend Tests

on:
pull_request:
paths:
- 'frontend/**'
- '.github/workflows/frontend-tests.yml'

jobs:
test:
name: FE Unit Tests (20)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: TypeScript compilation
working-directory: frontend
run: npm run tsc
- name: Run tests and collect coverage
working-directory: frontend
run: npm run test:coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./frontend/coverage/coverage-final.json
flags: frontend

0 comments on commit d635c69

Please sign in to comment.