Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelvlach committed Feb 2, 2025
1 parent b4e336c commit f2a4e44
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 30 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/agdb_api_typescript.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@ on:
jobs:
agdb_api_typescript:
runs-on: ubuntu-latest
defaults:
run:
working-directory: agdb_api/typescript
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm run format:check
- run: npm run lint:check
- run: npm run format:check -- --filter=@agnesoft/agdb_api
- run: npm run lint:check -- --filter=@agnesoft/agdb_api
- run: npm run build
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: npm run test
- run: npm run test -- --filter=@agnesoft/agdb_api
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/agdb_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ jobs:
fetch-depth: 0
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo fmt -p agdb_ci --check
- run: npm ci && npm run build
working-directory: agdb_api/typescript
- run: npm ci && npm run build
working-directory: agdb_studio
- run: cargo clippy -p agdb_ci --all-targets --all-features -- -D warnings
- run: cargo run -p agdb_ci -r
- run: |
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/agdb_studio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,21 @@ on:
jobs:
agdb_studio:
runs-on: ubuntu-latest
defaults:
run:
working-directory: agdb_studio
steps:
- uses: actions/checkout@v4
- run: npm ci && npm run build
working-directory: agdb_api/typescript
- run: npm ci
- run: npm run format:check
- run: npm run lint
- run: npm run test
- run: npm run format:check -- --filter=agdb_studio
- run: npm run lint:check -- --filter=agdb_studio
- run: npm run test -- --filter=agdb_studio
- uses: actions/upload-artifact@v4
if: always()
with:
name: coverage
path: agdb_studio/coverage/
retention-days: 30
- run: npx playwright install --with-deps
- run: npm run build
- run: npm run test:e2e
- run: npm run build -- --filter=agdb_studio
- run: npm run test:e2e -- --filter=agdb_studio
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/agdb_web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm run format:check
- run: npm run lint
- run: npm run test
- run: npm run format:check -- --filter=agdb_web
- run: npm run lint:check -- --filter=agdb_web
- run: npm run test -- --filter=agdb_web
- uses: actions/upload-artifact@v4
if: always()
with:
name: coverage
path: agdb_web/coverage/
retention-days: 30
- run: npx playwright install --with-deps
- run: npm run build
- run: npm run test:e2e
- run: npm run build -- --filter=agdb_web
- run: npm run test:e2e -- --filter=agdb_web
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,9 @@ jobs:
- uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org"
- run: npm ci
- working-directory: agdb_api/typescript
run: |
npm ci
npm publish --access public
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ORG_TOKEN }}

Expand Down
3 changes: 1 addition & 2 deletions agdb_server/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ fn run_command(command: &str, dir: &str) {
#[allow(dead_code)]
fn build_studio() {
if std::env::var("AGDB_DOCKER_BUILD").is_err() {
run_command("npm ci && npm run build", "../agdb_api/typescript");
run_command("npm ci && npm run build", "../agdb_studio");
run_command("npm ci && npm run build -- --filter=agdb_studio", "../");
}
}

Expand Down
1 change: 1 addition & 0 deletions agdb_studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"build-only": "vite build",
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
"lint": "eslint --max-warnings=0 . --fix",
"lint:check": "eslint --max-warnings=0 .",
"format": "prettier --write src/ e2e/",
"format:check": "prettier --check src/ e2e/",
"before-commit": "npm run format && npm run lint && npm run test && npm run test:e2e"
Expand Down
1 change: 1 addition & 0 deletions agdb_web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"lint:check": "next lint",
"format": "prettier . --write",
"format:check": "prettier . --check",
"test": "vitest run --coverage",
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"test": "turbo run test",
"test:e2e": "turbo run test:e2e",
"lint": "turbo run lint",
"lint:check": "turbo run lint:check",
"format": "turbo run format",
"format:check": "turbo run format:check",
"before-commit": "turbo run before-commit",
"build-studio": "turbo run agdb_studio#build"
},
Expand Down

0 comments on commit f2a4e44

Please sign in to comment.