Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
QZera committed Jun 9, 2024
2 parents 03dfdc9 + adc6c6c commit 82e9012
Show file tree
Hide file tree
Showing 122 changed files with 10,378 additions and 128 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: check-httpd-api-unit-test
name: check-http-client-unit-test
on: push

jobs:
check-httpd-api-unit-test:
check-http-client-unit-test:
runs-on: ubuntu-latest
steps:
- name: Setup Node
Expand All @@ -18,4 +18,4 @@ jobs:
./scripts/install-binaries;
./scripts/install-binaries --show-path >> $GITHUB_PATH;
- run: |
npm run test:httpd-api:unit
npm run test:http-client:unit
50 changes: 50 additions & 0 deletions .github/workflows/check-http-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: check-http-server
on: push

jobs:
test:
name: Build & Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./http-server
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: http-server -> target
- name: Build
run: cargo build --all-features
- name: Run tests
run: cargo test --all-features
docs:
name: Docs
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./http-server
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: http-server -> target
- name: Docs
run: cargo doc --all --all-features
lint:
name: Lint
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./http-server
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: http-server -> target
- name: Run clippy
run: cargo clippy --all --tests
- name: Check formatting
run: cargo fmt --all --check
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
node_modules/
NOTES
config/local*
http-server/target

# KaTeX files
*.min.css
Expand Down
7 changes: 6 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ export default [
},
},
{
ignores: ["node_modules/**/*", "build/**/*", "public/**/*"],
ignores: [
"node_modules/**/*",
"build/**/*",
"public/**/*",
"http-server/**/*",
],
},
];
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
scripts/check
{
npm run test:unit
npm run test:httpd-api:unit
npm run test:http-client:unit
} | tee /dev/null
runHook postCheck
'';
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, test } from "vitest";

import { HttpdClient } from "@httpd-client";
import { HttpdClient } from "@http-client";
import { defaultHttpdPort } from "@tests/support/fixtures";

const api = new HttpdClient({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, test } from "vitest";

import { HttpdClient } from "@httpd-client";
import { HttpdClient } from "@http-client";
import {
aliceMainHead,
aliceRemote,
Expand All @@ -14,9 +14,9 @@ import {
assertPatch,
createIssueToBeModified,
createPatchToBeModified,
} from "@httpd-client/tests/support/support";
import { authenticate } from "@httpd-client/tests/support/httpd.js";
import { testFixture as testWithAPI } from "@httpd-client/tests/support/fixtures.js";
} from "@http-client/tests/support/support";
import { authenticate } from "@http-client/tests/support/httpd.js";
import { testFixture as testWithAPI } from "@http-client/tests/support/fixtures.js";

describe("project", () => {
const api = new HttpdClient({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import * as FsSync from "node:fs";
import * as Path from "node:path";
import { describe, test } from "vitest";

import { HttpdClient } from "@httpd-client";
import { authenticate } from "@httpd-client/tests/support/httpd.js";
import { HttpdClient } from "@http-client";
import { authenticate } from "@http-client/tests/support/httpd.js";
import { createPeerManager } from "@tests/support/peerManager.js";
import { gitOptions } from "@tests/support/fixtures.js";
import { tmpDir } from "@tests/support/support.js";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as FsSync from "node:fs";
import * as Path from "node:path";
import { test } from "vitest";

import { HttpdClient } from "@httpd-client";
import { HttpdClient } from "@http-client";
import { RadiclePeer, createPeerManager } from "@tests/support/peerManager.js";
import { gitOptions } from "@tests/support/fixtures.js";
import { tmpDir } from "@tests/support/support.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { HttpdClient } from "@httpd-client";
import type { HttpdClient } from "@http-client";
import type { RadiclePeer } from "@tests/support/peerManager.js";

import assert from "node:assert";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { HttpdClient } from "@httpd-client";
import type { HttpdClient } from "@http-client";

import { expect } from "vitest";
import isMatch from "lodash/isMatch";
Expand Down
4 changes: 2 additions & 2 deletions httpd-client/vite.config.ts → http-client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ export default defineConfig({
],
test: {
environment: "node",
include: ["httpd-client/tests/*.test.ts"],
include: ["http-client/tests/*.test.ts"],
reporters: "verbose",
globalSetup: "./tests/support/globalSetup",
},
resolve: {
alias: {
"@tests": path.resolve("./tests"),
"@app": path.resolve("./src"),
"@httpd-client": path.resolve("./httpd-client"),
"@http-client": path.resolve("./http-client"),
},
},
});
Loading

0 comments on commit 82e9012

Please sign in to comment.