Merge pull request #1113 from mathuo/chore/update-package-readmes #3161
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: [master] | |
| pull_request: | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| ~/.npm | |
| key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-modules- | |
| - run: yarn | |
| - name: Check formatting | |
| run: npm run format:check | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| ~/.npm | |
| key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-modules- | |
| - run: yarn | |
| - name: Lint | |
| run: npm run lint | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| ~/.npm | |
| key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-modules- | |
| - run: yarn | |
| - run: npx nx run-many -t build --projects=dockview-core,dockview,dockview-vue,dockview-react,dockview-angular | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-output | |
| path: packages/ | |
| retention-days: 1 | |
| bundle: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| ~/.npm | |
| key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-modules- | |
| - run: yarn | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: build-output | |
| path: packages/ | |
| - run: npx nx run-many -t build:bundle --projects=dockview-core,dockview,dockview-vue,dockview-react,dockview-angular | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| ~/.npm | |
| key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-modules- | |
| - run: yarn | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: build-output | |
| path: packages/ | |
| - run: npm run test:cov | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-output | |
| path: | | |
| coverage/ | |
| test-report.xml | |
| retention-days: 1 | |
| sonar: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: coverage-output | |
| - name: SonarCloud Scan | |
| if: env.SONAR_TOKEN != '' | |
| uses: sonarsource/sonarqube-scan-action@v5 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |