Skip to content

Commit

Permalink
build(manager): fix the build and test suite (#1971)
Browse files Browse the repository at this point in the history
* chore(server_manager): fix the manager

* Add `server_manager/node_modules` to cleanup.

* Serve images for karma tests to avoid 1000+ 404 errors that make debugging hard.

* Fix some more tests.

* Dedupe `lit-html` that is messing up the `repeat` directive.

* Update `package-lock.json`.

* Revert `singleRun: true`.

* Move lint check to its own workflow.

* Fix `@typescript-eslint/eslint-plugin` dependency to handle TS decorators.

* Correct dependency path.

* Fix lit imports.

* Make tests run in random order.

* Remove cleaning of node_modules in favor of #1978.
  • Loading branch information
sbruens authored Apr 19, 2024
1 parent c8e082a commit a6ef9f7
Show file tree
Hide file tree
Showing 29 changed files with 32,772 additions and 2,925 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/build_and_test_debug_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ jobs:
- name: Install NPM Dependencies
run: npm set cache .npm && npm ci

- name: Run Linter
run: npm run action lint

- name: Build Web App
run: npm run action client/src/www/build

Expand Down Expand Up @@ -133,7 +130,7 @@ jobs:

- name: Build Tun2Socks (required for Test OutlineAppleLib)
run: npm run action client/src/tun2socks/build macos

- name: Test OutlineAppleLib
run: npm run action client/src/cordova/test macos

Expand Down Expand Up @@ -174,7 +171,7 @@ jobs:
go-version-file: '${{ github.workspace }}/go.mod'

- name: Build Tun2Socks (required for Test OutlineAppleLib)
run: npm run action client/src/tun2socks/build ios
run: npm run action client/src/tun2socks/build ios

- name: Test OutlineAppleLib
run: npm run action client/src/cordova/test ios
Expand Down
27 changes: 3 additions & 24 deletions .github/workflows/build_and_test_debug_manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,9 @@ on:
- master

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Install Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: ./server_manager/package.json

- name: Install NPM Dependencies
run: npm ci

- name: Lint
run: npm run lint

web_test:
name: Web Test
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout
uses: actions/[email protected]
Expand All @@ -54,7 +33,7 @@ jobs:

- name: Manager Web Test
run: npm run action server_manager/test

linux_debug_build:
name: Linux Debug Build
runs-on: ubuntu-latest
Expand Down Expand Up @@ -101,7 +80,7 @@ jobs:

- name: Build Windows Manager
run: npm run action server_manager/electron_app/build windows

mac_debug_build:
name: MacOS Debug Build
runs-on: macos-11
Expand All @@ -121,7 +100,7 @@ jobs:

- name: Install NPM Dependencies
run: npm ci

- name: Set XCode Version
run: sudo xcode-select -switch /Applications/Xcode_13.2.app

Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Lint

concurrency:
group: ${{ github.head_ref || github.ref }}
cancel-in-progress: true

on:
pull_request:
types:
- opened
- synchronize
push:
branches:
- master

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Install Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: ./package-lock.json

- name: Install NPM Dependencies
run: npm ci

- name: Lint
run: npm run lint
2 changes: 0 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@
"@types/node": "^14.14.7",
"@types/polymer": "^1.2.9",
"@types/uuidv4": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^5.32.0",
"@typescript-eslint/parser": "^5.32.0",
"@web/dev-server": "^0.1.35",
"@web/dev-server-esbuild": "^0.3.3",
"@web/dev-server-storybook": "^0.5.4",
Expand Down
5 changes: 5 additions & 0 deletions jasmine.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"spec_dir": ".",
"spec_files": ["output/build/js/**/*.spec.js"],
"stopSpecOnExpectationFailure": false
}
Loading

0 comments on commit a6ef9f7

Please sign in to comment.