feat: improve tab group context menu with inline rename, horizontal c… #3359
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 | |
| gen: | |
| 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: Generate and check for diff | |
| run: | | |
| npm run gen | |
| git diff __generated__/ > /tmp/gen-diff.txt | |
| if [ -s /tmp/gen-diff.txt ]; then | |
| echo "::error::Generated files are out of date. Run 'npm run gen' and commit the changes." | |
| cat /tmp/gen-diff.txt | |
| exit 1 | |
| fi | |
| echo "Generated files are up to date." | |
| - name: Remove stale gen comment | |
| if: always() && github.event_name == 'pull_request' | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh api "repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" \ | |
| --paginate --jq '.[] | select(.body | contains("<!-- gen-check -->")) | .id' \ | |
| | xargs -I{} gh api -X DELETE "repos/${{ github.repository }}/issues/comments/{}" | |
| - name: Comment diff on PR | |
| if: failure() && github.event_name == 'pull_request' | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| DIFF=$(cat /tmp/gen-diff.txt) | |
| gh pr comment ${{ github.event.pull_request.number }} --body "$(cat <<EOF | |
| <!-- gen-check --> | |
| ## ⚠️ Generated files are out of date | |
| Run \`npm run gen\` and commit the result. | |
| <details> | |
| <summary>Diff</summary> | |
| \`\`\`diff | |
| ${DIFF} | |
| \`\`\` | |
| </details> | |
| EOF | |
| )" | |
| 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 }} |