Skip to content

refactor: frontend #1526

refactor: frontend

refactor: frontend #1526

Workflow file for this run

---
name: Frontend CI
on:
push:
branches: [main]
pull_request:
env:
NODE_VERSION: 18
defaults:
run:
working-directory: ./frontend
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the prod image
run: |
docker build .
lint:
runs-on: [ubuntu-latest]
timeout-minutes: 5
strategy:
matrix:
target: [js, hbs]
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
cache-dependency-path: frontend/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Lint ${{ matrix.target }}
run: pnpm lint:${{ matrix.target }}
test:
needs: [lint]
runs-on: [ubuntu-latest]
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
cache-dependency-path: frontend/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Run tests
run: pnpm test:ember
env:
COVERAGE: true
- name: upload coverage report to codecov
uses: codecov/codecov-action@v5
with:
file: ./coverage/lcov.info