.github/workflows/test.yml
name: Test
on:
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 13.x]
steps:
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore yarn cache (if available)
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --frozen-lockfile
- run: yarn cypress install
- run: yarn lint
- run: yarn build
- run: yarn build-zip
- run: yarn test:e2e:ci
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
- run: test -f dist/manifest.json
- run: test -f dist/background.js
- run: test -f dist/vendor.js
- run: test -f dist/vendor.css
- run: test -f dist/popup/popup.js
- run: test -f dist/popup/popup.css
- run: test -f dist/options/options.js
- run: test -f dist/options/options.css
- run: test -f "dist-zip/Solary-v$(node -pe "require('./package.json').version").zip"