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

ci: add build workflow for client #107

Merged
merged 4 commits into from
Jan 18, 2025
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
37 changes: 37 additions & 0 deletions .github/workflows/client-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Client - Build

on:
pull_request:
branches:
- develop
workflow_dispatch:

jobs:
build:
name: Build Application
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install Dependencies
run: |
cd client
npm ci --cache .npm --prefer-offline

- name: Run Build
run: |
cd client
npm run build

- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: client-app
path: app
2 changes: 1 addition & 1 deletion .github/workflows/client-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install dependencies
run: |
cd client
npm install
npm ci --cache .npm --prefer-offline

- name: Run vitest
run: |
Expand Down
6 changes: 3 additions & 3 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion client/src/lib/services/sign-in.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const user: UserDTO = {
last_signed_in: new Date(),
is_verified: false,
created_at: new Date(),
updated_at: new Date(),
};

describe("signIn", () => {
Expand Down
14 changes: 11 additions & 3 deletions client/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
import { defineConfig as testConfig } from "vitest/config";
import { defineConfig as viteConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import { defineConfig } from "vitest/config";
import path from "path";

// https://vitejs.dev/config/
export default defineConfig({
const defineViteConfig = viteConfig({
plugins: [react()],
resolve: {
alias: {
"@": path.resolve(__dirname, "src"),
},
},
});

const defineTestConfig = testConfig({
test: {
globals: true,
environment: "jsdom",
},
});

export default {
...defineViteConfig,
...defineTestConfig,
};
Loading