Skip to content

docs: Insert maintenance notice (#966) #2311

docs: Insert maintenance notice (#966)

docs: Insert maintenance notice (#966) #2311

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
changes:
runs-on: ubuntu-latest
outputs:
wmr: ${{ steps.filter.outputs.wmr }}
preact-iso: ${{ steps.filter.outputs.preact-iso }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
wmr:
- 'packages/wmr/**'
- 'examples/demo/**'
preact-iso:
- 'packages/preact-iso/**'
wmr-prod-test:
needs: changes
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 18.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- 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-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Use Yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
if: ${{ needs.changes.outputs.wmr == 'true' }}
run: yarn --prefer-offline --frozen-lockfile --non-interactive --silent
- name: Build
if: ${{ needs.changes.outputs.wmr == 'true' }}
run: yarn wmr build
- name: Test production
if: ${{ needs.changes.outputs.wmr == 'true' }}
run: yarn wmr test-prod
wmr-dev-test:
needs: changes
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 18.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- 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-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Use Yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
if: ${{ needs.changes.outputs.wmr == 'true' }}
run: yarn --prefer-offline --frozen-lockfile --non-interactive --silent
- name: Test wmr
if: ${{ needs.changes.outputs.wmr == 'true' }}
run: yarn eslint packages/wmr && yarn wmr test
preact-iso-test:
needs: changes
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 18.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- 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-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Use Yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
if: ${{ needs.changes.outputs.preact-iso == 'true' }}
run: yarn --prefer-offline --frozen-lockfile --non-interactive --silent
- name: Test preact-iso
if: ${{ needs.changes.outputs.preact-iso == 'true' }}
run: yarn eslint packages/preact-iso && yarn iso test
lhci:
needs: changes
if: ${{ needs.changes.outputs.wmr == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Prepare LHCI
run: npm install -g @lhci/[email protected]
- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Use Yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: yarn --prefer-offline --frozen-lockfile --non-interactive --silent
- name: Build
run: yarn ci
- name: LHCI
run: lhci autorun --upload.target=temporary-public-storage --collect.url="http://localhost:8080" --collect.startServerCommand="yarn workspace @examples/demo serve" --collect.startServerReadyPattern="server running at" --upload.githubAppToken=${{ secrets.LHCI_GITHUB_APP_TOKEN }}