Skip to content

Test Examples

Test Examples #1504

name: Test Examples
on:
push:
branches:
- main
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "20 9 * * *"
workflow_dispatch:
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2-beta
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}
- name: build
run: |
npm run bootstrap
npm run build
env:
CI: true
- name: Test
env:
JSON_SECRETS: ${{ toJSON(secrets) }}
JSON_GITHUB: ${{ toJSON(github) }}
run: |
npm run build:example