mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 03:08:40 +00:00
Online screenshot diff/generation using CircleCI (#1187)
* Add CircleCI config for online screenshot verification/generation * Remove `Checkout unicode fonts` step Unicode-fonts are now a submodule, which is checked out in `Checkout submodule` step. * Always generate new screenshots
This commit is contained in:
committed by
Kevin Barabash
parent
0ce53e7631
commit
06e0393abc
57
.circleci/config.yml
Normal file
57
.circleci/config.yml
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
defaults: &defaults
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: Checkout submodule
|
||||||
|
command: |
|
||||||
|
git submodule sync
|
||||||
|
git submodule update --init --recursive
|
||||||
|
|
||||||
|
- restore_cache:
|
||||||
|
keys:
|
||||||
|
- npm-deps-{{ checksum "package.json" }}
|
||||||
|
- npm-deps-
|
||||||
|
- run:
|
||||||
|
name: Install npm dependencies
|
||||||
|
command: npm install
|
||||||
|
- save_cache:
|
||||||
|
key: npm-deps-{{ checksum "package.json" }}
|
||||||
|
paths:
|
||||||
|
- node_modules
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: Verify screenshots and generate diff
|
||||||
|
command: node dockers/Screenshotter/screenshotter.js --seleniumIP localhost -b $CIRCLE_JOB --verify --diff
|
||||||
|
- run:
|
||||||
|
name: Generate new screenshots
|
||||||
|
when: always
|
||||||
|
command: |
|
||||||
|
rm -rf test/screenshotter/images/*
|
||||||
|
node dockers/Screenshotter/screenshotter.js --seleniumIP localhost -b $CIRCLE_JOB
|
||||||
|
|
||||||
|
- store_artifacts:
|
||||||
|
path: test/screenshotter/images
|
||||||
|
destination: image
|
||||||
|
- store_artifacts:
|
||||||
|
path: test/screenshotter/diff
|
||||||
|
destination: diff
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
jobs:
|
||||||
|
firefox:
|
||||||
|
docker:
|
||||||
|
- image: circleci/node:6
|
||||||
|
- image: selenium/standalone-firefox:2.48.2
|
||||||
|
<<: *defaults
|
||||||
|
chrome:
|
||||||
|
docker:
|
||||||
|
- image: circleci/node:6
|
||||||
|
- image: selenium/standalone-chrome:2.48.2
|
||||||
|
<<: *defaults
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
screenshotter:
|
||||||
|
jobs:
|
||||||
|
- firefox
|
||||||
|
- chrome
|
@@ -48,6 +48,11 @@ fashion are well suited for visual inspection, but for exact binary
|
|||||||
comparisons it would be neccessary to carefully set up the environment
|
comparisons it would be neccessary to carefully set up the environment
|
||||||
to match the one used by the Docker approach.
|
to match the one used by the Docker approach.
|
||||||
|
|
||||||
|
You can also verify and generate screenshots online using a CI(continuous
|
||||||
|
integration) service. Fork the project, enable [CircleCI](https://circleci.com/) on your repository,
|
||||||
|
and push your changes. Diffs and generated screenshots are available at
|
||||||
|
build artifacts.
|
||||||
|
|
||||||
## Choosing the list of test cases
|
## Choosing the list of test cases
|
||||||
|
|
||||||
Both `screenshotter.js` and `screenshotter.sh` will accept
|
Both `screenshotter.js` and `screenshotter.sh` will accept
|
||||||
|
Reference in New Issue
Block a user