name: Build on: push: branches: - development paths: - '.github/workflows/build.yml' - 'packages/**/*' - '!packages/**/*.md' - '!packages/docs/*' - 'scripts/**/*' - 'babel.config.js' - 'package.json' - 'webpack.config.js' pull_request: branches: - development paths: - '.github/workflows/build.yml' - 'packages/**/*' - '!packages/**/*.md' - '!packages/docs/*' - 'scripts/**/*' - 'babel.config.js' - 'package.json' - 'webpack.config.js' 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: os: ['ubuntu-22.04', 'macos-12', 'windows-2022'] steps: - uses: actions/checkout@v3 - name: Setup node uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' - name: Install dependencies run: npm install - name: Ensure no lint errors run: npm run lint - name: Build @maxgraph/core - umd working-directory: packages/core run: npm run build - name: Build @maxgraph/core - esm working-directory: packages/core run: npm run generate-esm - name: Generate @maxgraph/core types working-directory: packages/core run: npm run generate-types - name: Test @maxgraph/core working-directory: packages/core run: npm test - name: Test TypeScript support working-directory: packages/ts-support run: npm test - name: Build ts-example working-directory: packages/ts-example run: npm run build