Agent folder encapsulation (#1621) #130
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: Regression testing | |
| on: | |
| #pull_request: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "package.json" | |
| - "@versions/node-sdk.ts" | |
| workflow_dispatch: | |
| jobs: | |
| detect-version-bump: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version_changed: ${{ steps.check-version.outputs.version_changed }} | |
| new_version: ${{ steps.extract-version.outputs.version }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 2 | |
| - name: Check for version changes | |
| id: check-version | |
| run: | | |
| git diff HEAD^ HEAD -- package.json lerna.json */package.json | grep -q '"version"' && \ | |
| echo "version_changed=true" >> $GITHUB_OUTPUT || \ | |
| echo "version_changed=false" >> $GITHUB_OUTPUT | |
| - name: Extract new version | |
| id: extract-version | |
| if: steps.check-version.outputs.version_changed == 'true' | |
| run: | | |
| VERSION=$(node -p "require('./package.json').version") | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| validate-regression: | |
| needs: detect-version-bump | |
| runs-on: ubuntu-latest | |
| env: | |
| DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }} | |
| REGION: ${{ vars.REGION }} | |
| SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Prepare Yarn | |
| run: corepack prepare yarn@4.6.0 --activate | |
| shell: bash | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Run regression tests | |
| run: yarn regression | |
| - name: Send Slack notification on failure | |
| if: failure() || cancelled() | |
| uses: ./.github/actions/slack-notification | |
| with: | |
| workflow-name: "Regression testing" | |
| slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }} |