Compare commits
6 Commits
e74ddb96ab
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| cd28b5009a | |||
|
|
171e505f22 | ||
|
|
dff828addf | ||
|
|
1481e31182 | ||
|
|
4b80619c97 | ||
|
|
836617fa54 |
50
.github/workflows/test.yaml
vendored
50
.github/workflows/test.yaml
vendored
@@ -50,12 +50,27 @@ jobs:
|
||||
restore-keys: |
|
||||
frontend-build-${{ runner.os }}-
|
||||
|
||||
- name: Copy frontend build to expected location
|
||||
# TODO: uncomment until artifact hanlding fixed in gitea
|
||||
# - name: Download frontend build artifact
|
||||
# uses: actions/download-artifact@v4
|
||||
# with:
|
||||
# name: frontend-dist
|
||||
# path: apps/nxmesh-frontend/dist
|
||||
|
||||
# - name: Copy frontend build to expected location
|
||||
# run: |
|
||||
# # unlink frontend-dist
|
||||
# rm -f apps/nxmesh-master/frontend-dist || true
|
||||
# rm -rf apps/nxmesh-master/frontend-dist || true
|
||||
# cp -r apps/nxmesh-frontend/dist apps/nxmesh-master/frontend-dist
|
||||
|
||||
# ls -la apps/nxmesh-master/frontend-dist
|
||||
|
||||
- name: Create dummy build artifacts
|
||||
run: |
|
||||
# unlink frontend-dist
|
||||
rm -f apps/nxmesh-master/frontend-dist || true
|
||||
rm -rf apps/nxmesh-master/frontend-dist || true
|
||||
cp -r apps/nxmesh-frontend/dist apps/nxmesh-master/frontend-dist
|
||||
mkdir -p apps/nxmesh-master/frontend-dist
|
||||
echo "<html><body><h1>Dummy Build</h1></body></html>" > apps/nxmesh-master/frontend-dist/index.html
|
||||
|
||||
- name: Run tests
|
||||
run: cargo test --all-features -- --show-output
|
||||
@@ -86,12 +101,25 @@ jobs:
|
||||
restore-keys: |
|
||||
frontend-build-${{ runner.os }}-
|
||||
|
||||
- name: Copy frontend build to expected location
|
||||
# TODO: uncomment until artifact hanlding fixed in gitea
|
||||
# - name: Download frontend build artifact
|
||||
# uses: actions/download-artifact@v4
|
||||
# with:
|
||||
# name: frontend-dist
|
||||
# path: apps/nxmesh-frontend/dist
|
||||
|
||||
# - name: Copy frontend build to expected location
|
||||
# run: |
|
||||
# # unlink frontend-dist
|
||||
# rm -f apps/nxmesh-master/frontend-dist || true
|
||||
# rm -rf apps/nxmesh-master/frontend-dist || true
|
||||
# cp -r apps/nxmesh-frontend/dist apps/nxmesh-master/frontend-dist
|
||||
|
||||
- name: Create dummy build artifacts
|
||||
run: |
|
||||
# unlink frontend-dist
|
||||
rm -f apps/nxmesh-master/frontend-dist || true
|
||||
rm -rf apps/nxmesh-master/frontend-dist || true
|
||||
cp -r apps/nxmesh-frontend/dist apps/nxmesh-master/frontend-dist
|
||||
mkdir -p apps/nxmesh-master/frontend-dist
|
||||
echo "<html><body><h1>Dummy Build</h1></body></html>" > apps/nxmesh-master/frontend-dist/index.html
|
||||
|
||||
- name: Run clippy
|
||||
run: cargo clippy --all-features
|
||||
@@ -164,3 +192,9 @@ jobs:
|
||||
path: apps/nxmesh-frontend/dist
|
||||
key: frontend-build-${{ runner.os }}-run-${{ github.run_id }}
|
||||
# IGNORE restore-keys
|
||||
# TODO: uncomment until artifact hanlding fixed in gitea
|
||||
# - name: Upload frontend build artifact
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: frontend-dist
|
||||
# path: apps/nxmesh-frontend/dist
|
||||
|
||||
6
.github/workflows/verify.yaml
vendored
6
.github/workflows/verify.yaml
vendored
@@ -109,14 +109,14 @@ jobs:
|
||||
- name: Apply migrations
|
||||
if: steps.check_changes.outputs.changed == 'true'
|
||||
run: |
|
||||
cargo run -p nxmesh-migration -- up
|
||||
cd crates && sea-orm-cli migrate up
|
||||
|
||||
- name: Regenerate entities
|
||||
if: steps.check_changes.outputs.changed == 'true'
|
||||
run: |
|
||||
sea-orm-cli generate entity \
|
||||
cd crates && sea-orm-cli generate entity \
|
||||
--database-url "$DATABASE_URL" \
|
||||
--output-dir apps/nxmesh-master/src/db/entities \
|
||||
--output-dir ../apps/nxmesh-master/src/db/entities \
|
||||
--with-serde both \
|
||||
--with-copy-enums \
|
||||
--date-time-crate chrono
|
||||
|
||||
@@ -73,6 +73,17 @@ async fn get_file_handler(
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_asset() {
|
||||
// list all embedded assets for debugging
|
||||
let assets = FrontendAssets::iter().collect::<Vec<_>>();
|
||||
println!("Embedded assets: {:?}", assets);
|
||||
assert!(
|
||||
!assets.is_empty(),
|
||||
"Expected to find embedded assets, but found none"
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_get_index_html() {
|
||||
let index_html = get_index_html();
|
||||
|
||||
Reference in New Issue
Block a user