mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-23 01:57:29 +00:00
My plan is to move the existing package into a workspace and then split out the things that really ought to be their own packages. For example, the demo site and the experiments really ought to be separate. Fix lint command
50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
name: CI
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build-and-test:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [10.x, 12.x]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- name: Install Dependencies
|
|
run: yarn
|
|
- name: Lint
|
|
run: |
|
|
yarn workspace webamp lint
|
|
yarn workspace webamp type-check
|
|
- name: Build
|
|
run: |
|
|
yarn workspace webamp build
|
|
yarn workspace webamp 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: packages/webamp/js/__tests__/__image_snapshots__/__diff_output__/
|
|
- name: Generate New Screenshots
|
|
if: failure()
|
|
run: |
|
|
yarn workspace webamp integration-tests -u
|
|
- name: Upload New Screenshots
|
|
if: failure()
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: new_images
|
|
path: packages/webamp/js/__tests__/__image_snapshots__/
|