E2E tests after release on VSIX - insider 31.0.7144 #6576
This file contains 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: E2E tests after release on VSIX | |
run-name: E2E tests after release on VSIX - ${{ inputs.extension_type }} ${{ inputs.extension_version }} | |
on: | |
workflow_dispatch: | |
inputs: | |
extension_type: | |
description: 'Insider or stable extension' | |
required: true | |
extension_version: | |
description: 'VS Code extension version' | |
required: true | |
env: | |
SLACK-USERNAME: Prismo | |
SLACK_ICON_EMOJI: ':robot_face:' | |
ENVIRONMENT: ${{ secrets.ENVIRONMENT }} | |
SLACK_MSG_AUTHOR: prisma-bot | |
# * Enables github logging | |
# ACTIONS_STEP_DEBUG: true | |
jobs: | |
test: | |
name: Test published extension | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
outputs: | |
installed-extension: ${{ steps.install.outputs.installed-extension }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PRISMA_BOT_TOKEN }} | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'npm' | |
- name: Install Dependencies | |
run: npm install && npm run bootstrap | |
- name: Install extension via CLI | |
id: install | |
run: | | |
node scripts/e2eTestsOnVsix/install_extension.js ${{ github.event.inputs.extension_type }} ${{ github.event.inputs.extension_version }} | |
- name: Run test | |
if: ${{ steps.install.outputs.installed-extension }} | |
uses: coactions/setup-xvfb@v1 | |
with: | |
run: npm run test:e2e ${{ github.event.inputs.extension_type }} ${{ matrix.os }} ${{ github.event.inputs.extension_version }} | |
after-test: | |
name: Bump tested version and commit # scripts/versions/tested_extension_stable & tested_extension_insider | |
runs-on: ubuntu-latest | |
needs: [test] | |
if: always() | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PRISMA_BOT_TOKEN }} | |
- name: echo new version | |
run: echo ${{ needs.test.outputs.installed-extension }} | |
- name: Bump version | |
if: ${{needs.test.result == 'success' && needs.test.outputs.installed-extension }} | |
run: npm run test:bump ${{ github.event.inputs.extension_type }} ${{ github.event.inputs.extension_version }} | |
env: | |
GH_TOKEN: ${{ secrets.PRISMA_BOT_TOKEN }} # Needed and used in the shell script behind test:bump | |
- name: 'Set current job url in SLACK_FOOTER env var' | |
if: ${{ always() }} | |
run: echo "SLACK_FOOTER=<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID|Click here to go to the job logs>" >> $GITHUB_ENV | |
- name: Slack Notification on Failure | |
if: ${{ needs.test.result == 'failure' && needs.test.outputs.installed-extension }} | |
uses: rtCamp/action-slack-notify@v2.3.0 | |
env: | |
SLACK_TITLE: 'Testing released ${{ github.event.inputs.extension_type }} extension failed :x:' | |
SLACK_MESSAGE: ${{ github.event.inputs.extension_version }} | |
SLACK_COLOR: '#FF0000' | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_FAILURES }} | |
SLACK_CHANNEL: feed-language-tools-failures | |
- name: Slack Notification on Success | |
if: ${{ needs.test.result == 'success' && needs.test.outputs.installed-extension }} | |
uses: rtCamp/action-slack-notify@v2.3.0 | |
env: | |
SLACK_TITLE: 'Tested released ${{ github.event.inputs.extension_type }} extension :white_check_mark:' | |
SLACK_MESSAGE: ${{ github.event.inputs.extension_version }} | |
SLACK_COLOR: '#008000' | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_CHANNEL: feed-vscode-e2e-tests |