Skip to content

Commit

Permalink
Merge branch 'dev' into heroku-docker-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
metasoarous authored Jan 31, 2022
2 parents 47382a4 + f33d0b0 commit e3773d1
Show file tree
Hide file tree
Showing 57 changed files with 12,247 additions and 11,592 deletions.
2 changes: 1 addition & 1 deletion .bundlewatch.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
},
{
"path": "client-participation/dist/cached/*/js/polis.js",
"maxSize": "140 kB",
"maxSize": "150 kB",
},
{
"path": "client-participation/dist/cached/*/js/vis_bundle.js",
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/bundlewatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ on:
push:
# Required so that baseline for comparison is pushed to bundlewatch service.
branches: ["dev"]
# Note: Only configured for client-admin right now.
paths:
- .github/workflows/bundlewatch.yml
- client-admin/**
- client-participation/**
pull_request:
types: ["opened", "reopened", "synchronize"]
paths:
- .github/workflows/bundlewatch.yml
- client-admin/**
- client-participation/**

jobs:
bundlewatch:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-clojure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
- uses: actions/[email protected]

- name: Prepare java
uses: actions/setup-java@v2.3.0
uses: actions/setup-java@v2.5.0
with:
distribution: adopt
java-version: 16.0.2

- name: Install Clojure tooling
uses: DeLaGuardo/setup-clojure@3.5
uses: DeLaGuardo/setup-clojure@3.7
with:
cli: 1.10.1.693

Expand Down
30 changes: 30 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Docker: Attach to Node",
"type": "node",
"request": "attach",
"port": 9229,
"address": "localhost",
"protocol": "inspector",
"remoteRoot": "/app",
"localRoot": "${workspaceFolder}/server",
"restart": true
},
{
"name": "Docker Node.js Launch",
"type": "docker",
"request": "launch",
"preLaunchTask": "docker-run: debug",
"platform": "node",
"node": {
"package": "${workspaceFolder}/server/package.json",
"localRoot": "${workspaceFolder}/server"
}
}
]
}
42 changes: 42 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "docker-build",
"label": "docker-build",
"platform": "node",
"dockerBuild": {
"dockerfile": "${workspaceFolder}/server/Dockerfile",
"context": "${workspaceFolder}/server",
"pull": true
},
"node": {
"package": "${workspaceFolder}/server/package.json"
}
},
{
"type": "docker-run",
"label": "docker-run: release",
"dependsOn": ["docker-build"],
"platform": "node",
"node": {
"package": "${workspaceFolder}/server/package.json"
}
},
{
"type": "docker-run",
"label": "docker-run: debug",
"dependsOn": ["docker-build"],
"dockerRun": {
"env": {
"DEBUG": "*",
"NODE_ENV": "development"
}
},
"node": {
"package": "${workspaceFolder}/server/package.json",
"enableDebugging": true
}
}
]
}
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,20 @@ You can then run a minimal test suite with:
make e2e-run-minimal
```

You can also run a subset of tests (even just one) with:

```
make e2e-run-subset TEST_FILTER=kitchensink
```

If for whatever reason, Docker is serving your application from a remote IP or URL instead of `http://127.0.0.1`, then there are work-arounds:

```
make e2e-run-minimal BASEURL=https://123.45.67.89.xip.io
make e2e-run-minimal BASEURL=https://123.45.67.89.sslip.io
make e2e-run-minimal BASEURL=https://mydomain.dev # Won't work right now
```

(Specifically, [xip.io](https://xip.io) is a free third-party support service that allows any IP to "pretend" it's a domain.
(Specifically, [sslip.io](https://sslip.io) is a free third-party support service that allows any IP to "pretend" it's a domain.
There is currently a hardcoded "allow list" in the codebase,
that lets this service work in the "development mode" that our Docker environment currently uses.)

Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
BASEURL ?= https://127.0.0.1.xip.io

BASEURL ?= https://127.0.0.1.sslip.io
E2E_RUN = cd e2e; CYPRESS_BASE_URL=$(BASEURL)

pull: ## Pull most recent Docker container builds (nightlies)
Expand All @@ -17,7 +18,7 @@ e2e-prepare: ## Prepare to run Cypress E2E tests
@# Testing embeds requires a override of a file prior to build.
cp e2e/cypress/fixtures/html/embed.html client-admin/embed.html

e2e-run-minimal: ## Run E2E tests: minimal (for nightly builds)
e2e-run-minimal: ## Run E2E tests: minimal (smoke test)
$(E2E_RUN) npm run e2e:minimal

e2e-run-standalone: ## Run E2E tests: standalone (no credentials required)
Expand All @@ -26,6 +27,9 @@ e2e-run-standalone: ## Run E2E tests: standalone (no credentials required)
e2e-run-secret: ## Run E2E tests: secret (credentials required)
$(E2E_RUN) npm run e2e:secret

e2e-run-subset: ## Run E2E tests: filter tests by TEST_FILTER envvar (without browser exit)
$(E2E_RUN) npm run e2e:subset

e2e-run-all: ## Run E2E tests: all
$(E2E_RUN) npm run e2e:all

Expand Down
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: sh -c 'cd server && node --max_old_space_size=400 --gc_interval=100 --harmony app.js'
web: sh -c 'cd server && npm i && npm run build && node --max_old_space_size=400 --gc_interval=100 --harmony dist/app.js'
Loading

0 comments on commit e3773d1

Please sign in to comment.