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

build(frontend): test the frontend build in CI #580

Merged
merged 1 commit into from
Nov 22, 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
28 changes: 28 additions & 0 deletions .github/workflows/frontend-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Frontend build

on:
pull_request:
push:
branches:
- master
- ui-enhancements
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend-v2
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: "lts/iron"
cache: "yarn"
cache-dependency-path: ./frontend-v2/yarn.lock
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: npm run build
4 changes: 2 additions & 2 deletions frontend-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"react-toastify": "^9.1.3"
},
"scripts": {
"start": "vite",
"build": "vite build",
"start": "npx tsc && vite",
"build": "npx tsc && vite build",
"serve": "vite preview",
"lint": "eslint src",
"format": "prettier --write ./src",
Expand Down
1 change: 1 addition & 0 deletions frontend-v2/src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ test("renders learn react link", () => {
</Provider>,
);

// @ts-expect-error toBeInTheDocument doesn't exist in recent versions of Jest.
expect(getByText(/learn/i)).toBeInTheDocument();
});
1 change: 1 addition & 0 deletions frontend-v2/src/features/model/resetToSpeciesDefaults.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-expect-error MutationTrigger isn't exported from Redux any more.
import { MutationTrigger } from "@reduxjs/toolkit/dist/query/react/buildHooks";
import {
CombinedModelRead,
Expand Down
Loading