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

Fix: Failing UI Build #1399

Merged
merged 2 commits into from
Nov 27, 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
58 changes: 58 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,30 @@ jobs:
npm run lint


build-ui:
name: "Build UI"
runs-on: ubuntu-latest
needs:
- test-ui
- lint-ui
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Restore cached node modules
uses: actions/cache/restore@v4
with:
path: ./ui/node_modules
key: "${{ runner.os }}-node_modules-${{ env.NODE_VERSION }}-${{ hashFiles('./ui/package-lock.json') }}"
- name: Build
run: |
cd ui
npm run build


install-api:
name: "Install API"
runs-on: ubuntu-latest
Expand Down Expand Up @@ -331,6 +355,40 @@ jobs:
docker compose down


build-api:
name: "Build API"
runs-on: ubuntu-latest
needs:
- test-api
- lint-api
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
components: clippy, rustfmt
- name: Restore cargo registry
uses: actions/cache/restore@v4
with:
path: ~/.cargo/registry
key: "${{ runner.os }}-cargo_registry-${{ env.RUST_VERSION }}-${{ hashFiles('./api/Cargo.lock') }}"
- name: Restore cargo index
uses: actions/cache/restore@v4
with:
path: ~/.cargo/git
key: "${{ runner.os }}-cargo_index-${{ env.RUST_VERSION }}-${{ hashFiles('./api/Cargo.lock') }}"
- name: Restore cargo build
uses: actions/cache/restore@v4
with:
path: ./api/target
key: "${{ runner.os }}-cargo_build-${{ env.RUST_VERSION }}-${{ hashFiles('/api/Cargo.lock') }}"
- name: Build
run: |
cd api
cargo build

check-changelog:
name: "Check CHANGELOG"
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM rust:1.82 AS build

ARG APP_VERSION
ENV APP_VERSION=${APP_VERSION}

RUN apt update && apt install -y musl-tools musl-dev
RUN rustup target add x86_64-unknown-linux-musl

Expand All @@ -13,6 +16,9 @@ RUN cargo build --target x86_64-unknown-linux-musl --release --quiet

FROM alpine:3.17

ARG APP_VERSION
ENV APP_VERSION=${APP_VERSION}

RUN apk add --no-cache util-linux

## Import from builder.
Expand Down
3 changes: 3 additions & 0 deletions ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM node:22.5.1-alpine AS build

ARG APP_VERSION
ENV APP_VERSION=${APP_VERSION}

WORKDIR /app
COPY . .

Expand Down
Loading