Compare commits
2 Commits
a9a08d2ef8
...
1eeca606ec
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1eeca606ec | ||
|
|
6ce8850ddb |
16
.github/workflows/test.yaml
vendored
16
.github/workflows/test.yaml
vendored
@@ -45,11 +45,16 @@ jobs:
|
|||||||
- name: Restore frontend build cache
|
- name: Restore frontend build cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: apps/nxmesh-frontend/build
|
path: apps/nxmesh-frontend/dist
|
||||||
key: frontend-build-${{ runner.os }}-run-${{ github.run_id }}
|
key: frontend-build-${{ runner.os }}-run-${{ github.run_id }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
frontend-build-${{ runner.os }}-
|
frontend-build-${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Add dummy fonrtend build artifact to prevent build failure
|
||||||
|
run: |
|
||||||
|
mkdir -p apps/nxmesh-frontend/dist
|
||||||
|
touch apps/nxmesh-frontend/dist/dummy
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --all-features
|
run: cargo test --all-features
|
||||||
|
|
||||||
@@ -74,11 +79,16 @@ jobs:
|
|||||||
- name: Restore frontend build cache
|
- name: Restore frontend build cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: apps/nxmesh-frontend/build
|
path: apps/nxmesh-frontend/dist
|
||||||
key: frontend-build-${{ runner.os }}-run-${{ github.run_id }}
|
key: frontend-build-${{ runner.os }}-run-${{ github.run_id }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
frontend-build-${{ runner.os }}-
|
frontend-build-${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Add dummy fonrtend build artifact to prevent build failure
|
||||||
|
run: |
|
||||||
|
mkdir -p apps/nxmesh-frontend/dist
|
||||||
|
touch apps/nxmesh-frontend/dist/dummy
|
||||||
|
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
run: cargo clippy --all-features
|
run: cargo clippy --all-features
|
||||||
|
|
||||||
@@ -147,7 +157,7 @@ jobs:
|
|||||||
- name: Cache frontend build
|
- name: Cache frontend build
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: apps/nxmesh-frontend/build
|
path: apps/nxmesh-frontend/dist
|
||||||
key: frontend-build-${{ runner.os }}-run-${{ github.run_id }}
|
key: frontend-build-${{ runner.os }}-run-${{ github.run_id }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
frontend-build-${{ runner.os }}-
|
frontend-build-${{ runner.os }}-
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ pub async fn get_router() -> Router {
|
|||||||
.fallback(get_fallback_handler().await)
|
.fallback(get_fallback_handler().await)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(debug_assertions, axum::debug_handler)]
|
|
||||||
pub async fn get_fallback_handler() -> Result<axum::response::Html<Vec<u8>>, axum::http::StatusCode>
|
pub async fn get_fallback_handler() -> Result<axum::response::Html<Vec<u8>>, axum::http::StatusCode>
|
||||||
{
|
{
|
||||||
let index_html = get_index_html();
|
let index_html = get_index_html();
|
||||||
@@ -41,7 +40,6 @@ fn get_index_html() -> Option<Vec<u8>> {
|
|||||||
FrontendAssets::get(INDEX_HTML).map(|asset| asset.data.as_ref().to_owned())
|
FrontendAssets::get(INDEX_HTML).map(|asset| asset.data.as_ref().to_owned())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(debug_assertions, axum::debug_handler)]
|
|
||||||
async fn get_file_handler(
|
async fn get_file_handler(
|
||||||
axum::extract::Path(path): axum::extract::Path<String>,
|
axum::extract::Path(path): axum::extract::Path<String>,
|
||||||
) -> Result<axum::response::Response, axum::http::StatusCode> {
|
) -> Result<axum::response::Response, axum::http::StatusCode> {
|
||||||
|
|||||||
Reference in New Issue
Block a user