feat: add layer actions commands and sync entity states on ribbon com… #423
This file contains hidden or 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
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| permissions: | |
| actions: write | |
| contents: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| registry-url: https://registry.npmjs.org | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Lint code | |
| run: pnpm lint | |
| - name: Build projects | |
| run: | | |
| export NODE_OPTIONS="--max-old-space-size=4096" | |
| pnpm run build | |
| - name: Run tests | |
| run: pnpm test | |
| - name: Install Playwright Chromium | |
| run: pnpm --filter @mlightcad/cad-viewer-example exec playwright install --with-deps chromium | |
| - name: Run E2E tests | |
| run: pnpm --filter @mlightcad/cad-viewer-example test:e2e | |
| env: | |
| PLAYWRIGHT_BROWSER_CHANNEL: chromium | |
| - name: Upload Playwright artifacts | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-artifacts | |
| path: | | |
| packages/cad-viewer-example/playwright-report/ | |
| packages/cad-viewer-example/test-results/ | |
| if-no-files-found: ignore | |
| - name: Build docs | |
| run: pnpm doc | |
| - name: Pre-serve | |
| run: pnpm pre-serve | |
| - name: Publish packages to npm | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: pnpm publish:viewer | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Create github release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: Release ${{ github.ref_name }} | |
| generate_release_notes: true | |
| - name: Upload github pages artifact | |
| if: github.ref == 'refs/heads/main' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: './packages/examples/public/' | |
| deploy-pages: | |
| needs: build | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |