Fix remaining eval warning in release extension, lint on CI

This commit is contained in:
Dima Gerasimov 2019-12-09 21:03:33 +00:00 committed by Dmitrii Gerasimov
parent 7ab240947d
commit 1ca82d1c00
6 changed files with 9 additions and 9 deletions

View file

@ -7,7 +7,7 @@ jobs:
- image: circleci/node:latest
steps:
- checkout
- run: sudo npm install -g npm
- run: sudo npm install -g npm web-ext
- restore_cache:
keys:
@ -20,7 +20,7 @@ jobs:
paths:
- ./node_modules
- run: npm run build
- run: ./build --chrome --lint
# TODO ugh. is there a way for a job to inherit a cloned repo after npm run build has ran?? I'd like to separate build and check steps
# TODO ok, apparently it's a custom executor? https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
@ -40,7 +40,7 @@ jobs:
command: |
for browser in 'chrome'; do
zip -r -j "/tmp/grasp.zip" build/*
zip -r -j "/tmp/grasp.zip" dist/*
done
# TODO ugh, also can't use env variables in artifacts...

View file

@ -79,7 +79,6 @@ The only test(s) that don't run on CI at the moment (e.g. due to lack of X serve
Extra tests (not integrated in CI yet):
- `./build --lint`
- `scripts/test_with_browser.py`

2
build
View file

@ -33,6 +33,8 @@ def main():
*args,
], **kwargs)
# TODO do I need that back for dev manifest??
# "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'"
maybe_release = {'NODE_ENV': 'production'} if args.release else {}
env = {
'TARGET': target,

View file

@ -26,7 +26,7 @@ def grasp_test_server(capture_file: Path, port: str, template=None):
def test_server(tmp_path: Path):
cfile = tmp_path / 'test-capture.org'
PORT = '17777'
PORT = '17890'
def send(url: str, title: str):
# TODO eh, not sure if there is anything easier than httpie

View file

@ -14,7 +14,7 @@ from selenium import webdriver # type: ignore
from test_grasp import grasp_test_server
addon_path = (Path(__file__).parent.parent / 'build').absolute()
addon_path = (Path(__file__).parent.parent / 'dist').absolute()
def skip_if_ci(reason):
@ -91,7 +91,7 @@ def trigger_grasp():
@skip_if_ci('no GUI to run the browser..')
def test(tmp_path: Path):
capture_file = tmp_path / 'output.org'
port = '17777'
port = '17890'
template = '* [[%:link][%:description]]'
with grasp_test_server(capture_file=capture_file, template=template, port=port), get_webdriver() as driver:

View file

@ -23,6 +23,5 @@
"description": "Capture page, with extra information"
}
},
"manifest_version": 2,
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'"
"manifest_version": 2
}