feat: Add Python PROP format support with toPy() method #2
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: Performance Regression Check | |
| on: | |
| pull_request: | |
| branches: [ main, master, develop ] | |
| push: | |
| branches: [ main, master, develop ] | |
| jobs: | |
| performance-check: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: | | |
| cd ts-ritofile | |
| npm ci | |
| - name: Build project | |
| run: | | |
| cd ts-ritofile | |
| npm run build | |
| - name: Run unit tests | |
| run: | | |
| cd ts-ritofile | |
| npm test | |
| - name: Run byte-identical validation tests | |
| run: | | |
| cd ts-ritofile | |
| npm run test:validation | |
| - name: Run backward compatibility tests | |
| run: | | |
| cd ts-ritofile | |
| npm run test:compatibility | |
| - name: Run performance regression tests | |
| run: | | |
| cd ts-ritofile | |
| npm run test:performance | |
| - name: Run CI performance check | |
| run: | | |
| cd ts-ritofile | |
| npm run ci:performance | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: test-results-${{ matrix.node-version }} | |
| path: ts-ritofile/test-results/ | |
| - name: Comment PR with results | |
| if: github.event_name == 'pull_request' && failure() | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const resultsPath = 'ts-ritofile/test-results/performance-results.json'; | |
| if (fs.existsSync(resultsPath)) { | |
| const results = JSON.parse(fs.readFileSync(resultsPath, 'utf-8')); | |
| const comment = `## ⚠️ Performance Regression Detected | |
| Performance tests have failed. The following issues were detected: | |
| - **Total Tests:** ${results.numTotalTests} | |
| - **Passed:** ${results.numPassedTests} | |
| - **Failed:** ${results.numFailedTests} | |
| ### Failed Tests | |
| ${results.testResults | |
| .filter(t => t.status === 'failed') | |
| .map(t => `- ${t.name}`) | |
| .join('\n')} | |
| Please review the performance impact of your changes and optimize as needed. | |
| See the full test results in the workflow artifacts.`; | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: comment | |
| }); | |
| } |