Fix remaining eval warning in release extension, lint on CI
This commit is contained in:
parent
7ab240947d
commit
1ca82d1c00
|
@ -7,7 +7,7 @@ jobs:
|
||||||
- image: circleci/node:latest
|
- image: circleci/node:latest
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run: sudo npm install -g npm
|
- run: sudo npm install -g npm web-ext
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
|
@ -20,7 +20,7 @@ jobs:
|
||||||
paths:
|
paths:
|
||||||
- ./node_modules
|
- ./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 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
|
# 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: |
|
command: |
|
||||||
|
|
||||||
for browser in 'chrome'; do
|
for browser in 'chrome'; do
|
||||||
zip -r -j "/tmp/grasp.zip" build/*
|
zip -r -j "/tmp/grasp.zip" dist/*
|
||||||
done
|
done
|
||||||
|
|
||||||
# TODO ugh, also can't use env variables in artifacts...
|
# TODO ugh, also can't use env variables in artifacts...
|
||||||
|
|
|
@ -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):
|
Extra tests (not integrated in CI yet):
|
||||||
|
|
||||||
- `./build --lint`
|
|
||||||
- `scripts/test_with_browser.py`
|
- `scripts/test_with_browser.py`
|
||||||
|
|
||||||
|
|
||||||
|
|
2
build
2
build
|
@ -33,6 +33,8 @@ def main():
|
||||||
*args,
|
*args,
|
||||||
], **kwargs)
|
], **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 {}
|
maybe_release = {'NODE_ENV': 'production'} if args.release else {}
|
||||||
env = {
|
env = {
|
||||||
'TARGET': target,
|
'TARGET': target,
|
||||||
|
|
|
@ -26,7 +26,7 @@ def grasp_test_server(capture_file: Path, port: str, template=None):
|
||||||
|
|
||||||
def test_server(tmp_path: Path):
|
def test_server(tmp_path: Path):
|
||||||
cfile = tmp_path / 'test-capture.org'
|
cfile = tmp_path / 'test-capture.org'
|
||||||
PORT = '17777'
|
PORT = '17890'
|
||||||
|
|
||||||
def send(url: str, title: str):
|
def send(url: str, title: str):
|
||||||
# TODO eh, not sure if there is anything easier than httpie
|
# TODO eh, not sure if there is anything easier than httpie
|
||||||
|
|
|
@ -14,7 +14,7 @@ from selenium import webdriver # type: ignore
|
||||||
from test_grasp import grasp_test_server
|
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):
|
def skip_if_ci(reason):
|
||||||
|
@ -91,7 +91,7 @@ def trigger_grasp():
|
||||||
@skip_if_ci('no GUI to run the browser..')
|
@skip_if_ci('no GUI to run the browser..')
|
||||||
def test(tmp_path: Path):
|
def test(tmp_path: Path):
|
||||||
capture_file = tmp_path / 'output.org'
|
capture_file = tmp_path / 'output.org'
|
||||||
port = '17777'
|
port = '17890'
|
||||||
template = '* [[%:link][%:description]]'
|
template = '* [[%:link][%:description]]'
|
||||||
|
|
||||||
with grasp_test_server(capture_file=capture_file, template=template, port=port), get_webdriver() as driver:
|
with grasp_test_server(capture_file=capture_file, template=template, port=port), get_webdriver() as driver:
|
||||||
|
|
|
@ -23,6 +23,5 @@
|
||||||
"description": "Capture page, with extra information"
|
"description": "Capture page, with extra information"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"manifest_version": 2,
|
"manifest_version": 2
|
||||||
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'"
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue