Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean Up CI #166

Merged
merged 4 commits into from
Apr 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/scripts/verdaccio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#
# This is based on verdaccio's default config file. It allows all users
# to do anything, so don't use it on production systems.
#
# Look here for more config file examples:
# https://github.com/verdaccio/verdaccio/tree/master/conf
#

# path to a directory with all packages
storage: ./storage

auth:
htpasswd:
file: ./htpasswd
# Maximum amount of users allowed to register, defaults to "+inf".
# You can set this to -1 to disable registration.
#max_users: 1000

# a list of other known repositories we can talk to
uplinks:
npmjs:
url: https://registry.npmjs.org/
max_fails: 40
maxage: 30m
timeout: 60s
agent_options:
keepAlive: true
# Avoid exceeding the max sockets that are allocated per VM.
# https://docs.microsoft.com/en-us/azure/app-service/app-service-web-nodejs-best-practices-and-troubleshoot-guide#my-node-application-is-making-excessive-outbound-calls
maxSockets: 40
maxFreeSockets: 10

packages:
'@*/*':
# scoped packages
access: $all
publish: $all
proxy: npmjs

'**':
# allow all users (including non-authenticated users) to read and
# publish all packages
#
# you can specify usernames/groupnames (depending on your auth plugin)
# and three keywords: "$all", "$anonymous", "$authenticated"
access: $all

# allow all known users to publish packages
# (anyone can register by default, remember?)
publish: $all

# if package is not available locally, proxy requests to 'npmjs' registry
proxy: npmjs

# log settings
logs:
- { type: stdout, format: pretty, level: warn }
#- {type: file, path: verdaccio.log, level: info}

# See https://github.com/verdaccio/verdaccio/issues/301
server:
keepAliveTimeout: 0
41 changes: 32 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ jobs:
test:
name: JS
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
Expand All @@ -30,28 +31,50 @@ jobs:
${{ runner.os }}-yarn-

- name: Install dependencies
shell: bash
run: |
set -eux
npm install -g yarn
yarn

- name: Build
- name: Build Source
shell: bash
run: |
pushd packages/widgets
set -eux
yarn build
yarn minimize
popd
yarn clean
yarn build
yarn minimize
yarn build:test

- name: Tests
- name: Run Tests
uses: GabrielBB/xvfb-action@v1
with:
run: |
yarn test

- name: Docs
- name: Test Examples
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
set -eux
yarn minimize
yarn build:examples
yarn test:examples

- name: Build Docs
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
set -eux
yarn clean
yarn docs

- name: Publish with Verdaccio
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
set -eux
git checkout -b release
npm install -g verdaccio
verdaccio --config .github/scripts/verdaccio.yml &
npm set registry http://localhost:4873/
yarn config set registry http://localhost:4873/
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
yarn run version patch --no-push --yes
yarn run publish
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,16 @@ yarn test # optionally test:chrome, test:firefox, or test:ie
Lumino examples are in the `examples/` folder. To build and run an example:

```bash
yarn build:src
yarn minimize
yarn build:examples
cd example/dockpanel
```

Open the `index.html` file in a browser to see the running example.

There are also tests in some of the examples. These can be run as:

```bash
yarn test:examples
```
1 change: 0 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ def build_api_docs(out_dir):
check_call(npm + ['install', '-g', 'yarn'], cwd=root)
yarn = [shutil.which('yarn')]
check_call(yarn, cwd=root)
check_call(yarn + ["build:src"], cwd=root)
check_call(yarn + ["docs"], cwd=root)

dest_dir = osp.join(out_dir, "api")
Expand Down
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@
],
"scripts": {
"api": "lerna run api",
"minimize": "lerna run minimize",
"build": "lerna run build",
"build:examples": "lerna run build --scope \"@lumino/example-*\"",
"build:src": "lerna run build --scope \"@lumino/!(test-|example-)*\"",
"build": "npm run build:src",
"build:dist": "npm run build && npm run minimize",
"build:examples": "lerna run build --scope \"@lumino/example-*\" --concurrency 1",
"build:src": "lerna run build --scope \"@lumino/!(test-|example-)*\" --concurrency 1",
"build:test": "lerna run build:test",
"clean": "lerna run clean",
"clean:examples": "lerna run clean --scope \"@lumino/example-*\"",
"clean:src": "lerna run clean --scope \"@lumino/!(test-|example-)*\"",
"clean:tests": "lerna run clean:tests",
"docs": "rimraf docs/api && typedoc --options typedoc.js",
"docs": "rimraf docs/api && lerna run build:src --concurrency 1 && typedoc --options typedoc.js",
"get:dependency": "get-dependency",
"publish": "npm run clean && npm run build && npm run minimize && lerna publish -m \"Publish\" from-package",
"minimize": "lerna run minimize",
"publish": "npm run clean && npm run build:dist && lerna publish --yes -m \"Publish\" from-package",
"remove:dependency": "remove-dependency",
"test": "lerna run test",
"test": "lerna run test --scope \"@lumino/!(example-)*\"",
"test:examples": "lerna run test --scope \"@lumino/example-*\"",
"test:chrome": "lerna run test:chrome",
"test:firefox": "lerna run test:firefox",
"test:ie": "lerna run test:ie --concurrency 1",
Expand Down
3 changes: 2 additions & 1 deletion packages/algorithm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"types": "types/index.d.ts",
"scripts": {
"api": "api-extractor run --local --verbose",
"build": "tsc --build && rollup -c",
"build": "npm run build:src && rollup -c",
"build:src": "tsc --build",
"build:test": "tsc --build tests && cd tests && webpack",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
Expand Down
3 changes: 2 additions & 1 deletion packages/application/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"types": "types/index.d.ts",
"scripts": {
"api": "api-extractor run --local --verbose",
"build": "tsc --build && rollup -c",
"build": "npm run build:src && rollup -c",
"build:src": "tsc --build",
"build:test": "tsc --build tests && cd tests && webpack",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
Expand Down
3 changes: 2 additions & 1 deletion packages/collections/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"types": "types/index.d.ts",
"scripts": {
"api": "api-extractor run --local --verbose",
"build": "tsc --build && rollup -c",
"build": "npm run build:src && rollup -c",
"build:src": "tsc --build",
"build:test": "tsc --build tests && cd tests && webpack",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
Expand Down
3 changes: 2 additions & 1 deletion packages/commands/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"types": "types/index.d.ts",
"scripts": {
"api": "api-extractor run --local --verbose",
"build": "tsc --build && rollup -c",
"build": "npm run build:src && rollup -c",
"build:src": "tsc --build",
"build:test": "tsc --build tests && cd tests && webpack",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
Expand Down
3 changes: 2 additions & 1 deletion packages/coreutils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"types": "types/index.d.ts",
"scripts": {
"api": "api-extractor run --local --verbose",
"build": "tsc --build && rollup -c",
"build": "npm run build:src && rollup -c",
"build:src": "tsc --build",
"build:test": "tsc --build tests && cd tests && webpack",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
Expand Down
3 changes: 2 additions & 1 deletion packages/datagrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"types": "types/index.d.ts",
"scripts": {
"api": "api-extractor run --local --verbose",
"build": "tsc --build && rollup -c",
"build": "npm run build:src && rollup -c",
"build:src": "tsc --build",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"docs": "typedoc --options tdoptions.json src",
"minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js",
Expand Down
3 changes: 2 additions & 1 deletion packages/datastore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"types": "types/index.d.ts",
"scripts": {
"api": "api-extractor run --local --verbose",
"build": "tsc --build && rollup -c",
"build": "npm run build:src && rollup -c",
"build:src": "tsc --build",
"build:test": "tsc --build tests && cd tests && webpack",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"docs": "typedoc --options tdoptions.json src",
Expand Down
3 changes: 2 additions & 1 deletion packages/disposable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"types": "types/index.d.ts",
"scripts": {
"api": "api-extractor run --local --verbose",
"build": "tsc --build && rollup -c",
"build": "npm run build:src && rollup -c",
"build:src": "tsc --build",
"build:test": "tsc --build tests && cd tests && webpack",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
Expand Down
3 changes: 2 additions & 1 deletion packages/domutils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"types": "types/index.d.ts",
"scripts": {
"api": "api-extractor run --local --verbose",
"build": "tsc --build && rollup -c",
"build": "npm run build:src && rollup -c",
"build:src": "tsc --build",
"build:test": "tsc --build tests && cd tests && webpack",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
Expand Down
3 changes: 2 additions & 1 deletion packages/dragdrop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"style": "style/index.css",
"scripts": {
"api": "api-extractor run --local --verbose",
"build": "tsc --build && rollup -c",
"build": "npm run build:src && rollup -c",
"build:src": "tsc --build",
"build:test": "tsc --build tests && cd tests && webpack",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
Expand Down
3 changes: 2 additions & 1 deletion packages/keyboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"types": "types/index.d.ts",
"scripts": {
"api": "api-extractor run --local --verbose",
"build": "tsc --build && rollup -c",
"build": "npm run build:src && rollup -c",
"build:src": "tsc --build",
"build:test": "tsc --build tests && cd tests && webpack",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
Expand Down
3 changes: 2 additions & 1 deletion packages/messaging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"types": "types/index.d.ts",
"scripts": {
"api": "api-extractor run --local --verbose",
"build": "tsc --build && rollup -c",
"build": "npm run build:src && rollup -c",
"build:src": "tsc --build",
"build:test": "tsc --build tests && cd tests && webpack",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
Expand Down
3 changes: 2 additions & 1 deletion packages/polling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"types": "types/index.d.ts",
"scripts": {
"api": "api-extractor run --local --verbose",
"build": "tsc --build && rollup -c",
"build": "npm run build:src && rollup -c",
"build:src": "tsc --build",
"build:test": "tsc --build tests && cd tests && webpack",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
Expand Down
3 changes: 2 additions & 1 deletion packages/properties/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"types": "types/index.d.ts",
"scripts": {
"api": "api-extractor run --local --verbose",
"build": "tsc --build && rollup -c",
"build": "npm run build:src && rollup -c",
"build:src": "tsc --build",
"build:test": "tsc --build tests && cd tests && webpack",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
Expand Down
3 changes: 2 additions & 1 deletion packages/signaling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"types": "types/index.d.ts",
"scripts": {
"api": "api-extractor run --local --verbose",
"build": "tsc --build && rollup -c",
"build": "npm run build:src && rollup -c",
"build:src": "tsc --build",
"build:test": "tsc --build tests && cd tests && webpack",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
Expand Down
3 changes: 2 additions & 1 deletion packages/virtualdom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"types": "types/index.d.ts",
"scripts": {
"api": "api-extractor run --local --verbose",
"build": "tsc --build && rollup -c",
"build": "npm run build:src && rollup -c",
"build:src": "tsc --build",
"build:test": "tsc --build tests && cd tests && webpack",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
Expand Down
3 changes: 2 additions & 1 deletion packages/widgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"style": "style/index.css",
"scripts": {
"api": "api-extractor run --local --verbose",
"build": "tsc --build && rollup -c",
"build": "npm run build:src && rollup -c",
"build:src": "tsc --build",
"build:test": "tsc --build tests && cd tests && webpack",
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
"clean:test": "rimraf tests/build",
Expand Down