Compare commits
7 Commits
5b9601c474
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| cd28b5009a | |||
|
|
171e505f22 | ||
|
|
dff828addf | ||
|
|
1481e31182 | ||
|
|
4b80619c97 | ||
|
|
836617fa54 | ||
|
|
e74ddb96ab |
52
.github/workflows/test.yaml
vendored
52
.github/workflows/test.yaml
vendored
@@ -50,11 +50,30 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
frontend-build-${{ runner.os }}-
|
frontend-build-${{ runner.os }}-
|
||||||
|
|
||||||
- name: create symlink to frontend build
|
# TODO: uncomment until artifact hanlding fixed in gitea
|
||||||
run: ln -s ${{ github.workspace }}/apps/nxmesh-frontend/dist ${{ github.workspace }}/apps/nxmesh-master/frontend-dist
|
# - 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: |
|
||||||
|
rm -f apps/nxmesh-master/frontend-dist || true
|
||||||
|
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
|
- name: Run tests
|
||||||
run: cargo test --all-features
|
run: cargo test --all-features -- --show-output
|
||||||
|
|
||||||
lint-crates:
|
lint-crates:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -82,8 +101,25 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
frontend-build-${{ runner.os }}-
|
frontend-build-${{ runner.os }}-
|
||||||
|
|
||||||
- name: create symlink to frontend build
|
# TODO: uncomment until artifact hanlding fixed in gitea
|
||||||
run: ln -s ${{ github.workspace }}/apps/nxmesh-frontend/dist ${{ github.workspace }}/apps/nxmesh-master/frontend-dist
|
# - 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: |
|
||||||
|
rm -f apps/nxmesh-master/frontend-dist || true
|
||||||
|
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
|
- name: Run clippy
|
||||||
run: cargo clippy --all-features
|
run: cargo clippy --all-features
|
||||||
@@ -156,3 +192,9 @@ jobs:
|
|||||||
path: apps/nxmesh-frontend/dist
|
path: apps/nxmesh-frontend/dist
|
||||||
key: frontend-build-${{ runner.os }}-run-${{ github.run_id }}
|
key: frontend-build-${{ runner.os }}-run-${{ github.run_id }}
|
||||||
# IGNORE restore-keys
|
# 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
|
- name: Apply migrations
|
||||||
if: steps.check_changes.outputs.changed == 'true'
|
if: steps.check_changes.outputs.changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
cargo run -p nxmesh-migration -- up
|
cd crates && sea-orm-cli migrate up
|
||||||
|
|
||||||
- name: Regenerate entities
|
- name: Regenerate entities
|
||||||
if: steps.check_changes.outputs.changed == 'true'
|
if: steps.check_changes.outputs.changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
sea-orm-cli generate entity \
|
cd crates && sea-orm-cli generate entity \
|
||||||
--database-url "$DATABASE_URL" \
|
--database-url "$DATABASE_URL" \
|
||||||
--output-dir apps/nxmesh-master/src/db/entities \
|
--output-dir ../apps/nxmesh-master/src/db/entities \
|
||||||
--with-serde both \
|
--with-serde both \
|
||||||
--with-copy-enums \
|
--with-copy-enums \
|
||||||
--date-time-crate chrono
|
--date-time-crate chrono
|
||||||
|
|||||||
@@ -73,6 +73,17 @@ async fn get_file_handler(
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
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]
|
#[tokio::test]
|
||||||
async fn test_get_index_html() {
|
async fn test_get_index_html() {
|
||||||
let index_html = get_index_html();
|
let index_html = get_index_html();
|
||||||
|
|||||||
Reference in New Issue
Block a user