2022-01-14 05:17:38 +00:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- development
|
|
|
|
paths:
|
2023-12-04 03:13:32 +00:00
|
|
|
- '.github/actions/build-setup/**/*'
|
2022-01-14 05:17:38 +00:00
|
|
|
- '.github/workflows/build.yml'
|
2023-12-04 03:13:32 +00:00
|
|
|
- '.eslint*'
|
2023-11-16 13:39:08 +00:00
|
|
|
- '.nvmrc'
|
2022-01-14 05:17:38 +00:00
|
|
|
- 'packages/**/*'
|
2023-05-22 14:13:33 +00:00
|
|
|
- '!packages/**/*.md'
|
2023-11-27 17:53:52 +00:00
|
|
|
- '!packages/website/**/*'
|
2022-01-14 05:17:38 +00:00
|
|
|
- 'package.json'
|
2023-12-04 03:13:32 +00:00
|
|
|
- 'package-lock.json'
|
|
|
|
- 'tsconfig.json'
|
2022-01-14 05:17:38 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- development
|
|
|
|
paths:
|
2023-12-04 03:13:32 +00:00
|
|
|
- '.github/actions/build-setup/**/*'
|
2022-01-14 05:17:38 +00:00
|
|
|
- '.github/workflows/build.yml'
|
2023-12-04 03:13:32 +00:00
|
|
|
- '.eslint*'
|
|
|
|
- '.nvmrc'
|
2022-01-14 05:17:38 +00:00
|
|
|
- 'packages/**/*'
|
2023-05-22 14:13:33 +00:00
|
|
|
- '!packages/**/*.md'
|
2023-11-27 17:53:52 +00:00
|
|
|
- '!packages/website/**/*'
|
2022-01-14 05:17:38 +00:00
|
|
|
- 'package.json'
|
2023-12-04 03:13:32 +00:00
|
|
|
- 'package-lock.json'
|
|
|
|
- 'tsconfig.json'
|
2022-01-14 05:17:38 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
# we want to run the full build on all os: don't cancel running jobs even if one fails
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-12-01 08:51:11 +00:00
|
|
|
os: ['ubuntu-22.04', 'macos-13', 'windows-2022']
|
2022-01-14 05:17:38 +00:00
|
|
|
steps:
|
2023-09-11 06:58:05 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-04 02:25:41 +00:00
|
|
|
- name: Build Setup
|
|
|
|
uses: ./.github/actions/build-setup
|
2022-07-05 06:08:25 +00:00
|
|
|
- name: Build @maxgraph/core - esm
|
2023-12-04 02:25:41 +00:00
|
|
|
run: npm run build -w packages/core
|
2022-12-16 15:51:51 +00:00
|
|
|
- name: Test @maxgraph/core
|
2023-12-04 02:25:41 +00:00
|
|
|
run: npm test -w packages/core
|
2022-11-07 17:31:40 +00:00
|
|
|
- name: Test TypeScript support
|
2023-12-04 02:25:41 +00:00
|
|
|
run: npm test -w packages/ts-support
|
2022-07-05 06:08:25 +00:00
|
|
|
- name: Build ts-example
|
2023-12-04 02:25:41 +00:00
|
|
|
run: npm run build -w packages/ts-example
|
2023-10-12 21:41:37 +00:00
|
|
|
- name: Build Storybook mini-site
|
2023-12-04 02:25:41 +00:00
|
|
|
run: npm run build -w packages/html
|
2023-10-12 21:41:37 +00:00
|
|
|
- name: Upload all examples as artifact
|
2023-12-18 14:54:31 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-10-12 21:41:37 +00:00
|
|
|
with:
|
2023-12-18 14:54:31 +00:00
|
|
|
name: bundles-test-results-${{runner.os}}-${{github.sha}}
|
2023-10-12 21:41:37 +00:00
|
|
|
path: |
|
|
|
|
packages/html/dist/
|
|
|
|
packages/ts-example/dist/
|
|
|
|
- name: Ensure no lint errors
|
|
|
|
run: npm run lint
|