mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-25 11:04:00 +00:00
Get Screenshot tests working in CI (#967)
* Use GitHub Actions only This retires Travis, and starts upload screenshot diffs when integration tests fail. * Use screenshots that match CI font rendering * Run tests on Node 12
This commit is contained in:
parent
1f1b7aa229
commit
296ffdd7da
14 changed files with 39 additions and 17 deletions
34
.github/workflows/nodejs.yml
vendored
34
.github/workflows/nodejs.yml
vendored
|
|
@ -3,7 +3,7 @@ name: CI
|
|||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
|
|
@ -16,9 +16,35 @@ jobs:
|
|||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Run Tests
|
||||
- name: Install Dependencies
|
||||
run: yarn
|
||||
- name: Lint
|
||||
run: |
|
||||
yarn
|
||||
yarn travis-tests
|
||||
yarn lint
|
||||
yarn type-check
|
||||
- name: Build
|
||||
run: |
|
||||
yarn build
|
||||
yarn build-library
|
||||
- name: Run Unit Tests
|
||||
run: yarn test
|
||||
- name: Run Integration Tests
|
||||
run: yarn integration-tests
|
||||
env:
|
||||
CI: true
|
||||
- name: Upload Screenshot Diffs
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: image_diffs
|
||||
path: js/__tests__/__image_snapshots__/__diff_output__/
|
||||
- name: Generate New Screenshots
|
||||
if: failure()
|
||||
run: |
|
||||
yarn integration-tests -u
|
||||
- name: Upload New Screenshots
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: new_images
|
||||
path: js/__tests__/__image_snapshots__/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue