This repository has been archived by the owner on Jun 16, 2024. It is now read-only.
Support typedefs #107
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, | |
# build the source code and run tests across different versions of node | |
# For more information see: | |
# https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
# Note: "jq" is installed by default on github runners | |
name: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
paths-ignore: ['README.md', 'LICENSE'] | |
pull_request: | |
branches: [ main ] | |
paths-ignore: ['README.md', 'LICENSE'] | |
concurrency: | |
group: ci-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install | |
run: npm clean-install --progress=false --no-fund | |
- name: Build | |
run: npm run build | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install | |
run: npm clean-install --progress=false --no-fund | |
- name: Lint | |
run: npm run lint | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Checkout template code | |
uses: actions/checkout@v4 | |
with: | |
repository: playcanvas/playcanvas-jsdoc-template | |
path: ./playcanvas-jsdoc-template | |
- name: Checkout engine code | |
uses: actions/checkout@v4 | |
with: | |
repository: playcanvas/engine | |
path: ./engine | |
- name: Show working directory with both repos | |
run: ls -al | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install updated template dependencies | |
run: npm clean-install --progress=false --no-fund | |
working-directory: ./playcanvas-jsdoc-template | |
- name: Build updated template | |
run: npm run build | |
working-directory: ./playcanvas-jsdoc-template | |
- name: Install engine dependencies | |
run: npm clean-install --progress=false --no-fund | |
working-directory: ./engine | |
- name: Read origional conf-api.json | |
run: cat ./conf-api.json | |
working-directory: ./engine | |
- name: Confirm current template works | |
run: npm run docs | |
working-directory: ./engine | |
- name: Show docs directory | |
run: ls ./docs/ | |
working-directory: ./engine | |
- name: Clear docs directory | |
run: rm -rf ./docs/ | |
working-directory: ./engine | |
- name: Rename original config file | |
run: mv conf-api.json conf-api.orig | |
working-directory: ./engine | |
- name: Point engine conf-api.json to updated template | |
run: jq '.opts.template=$tmpl' --arg tmpl "../playcanvas-jsdoc-template" conf-api.orig > conf-api.json | |
working-directory: ./engine | |
- name: Read modified conf-api.json | |
run: cat ./conf-api.json | |
working-directory: ./engine | |
- name: Build PlayCanvas API Reference with updated template | |
run: npm run docs | |
working-directory: ./engine | |
- name: Show docs directory | |
run: ls ./docs/ | |
working-directory: ./engine |