Skip to content

5. Integration tests in VS Code folder with published LS - Commit from main #4619

5. Integration tests in VS Code folder with published LS - Commit from main

5. Integration tests in VS Code folder with published LS - Commit from main #4619

Workflow file for this run

name: 5. Integration tests in VSCode folder with published LS
run-name: 5. Integration tests in VS Code folder with published LS - ${{ inputs.trigger_reason }}
on:
workflow_dispatch:
inputs:
npm_channel:
description: 'Prisma CLI NPM Channel'
required: true
extension_version:
description: 'VS Code extension version'
required: true
branch:
description: 'Branch to run run this workflow on'
required: true
trigger_reason:
description: 'Information about what caused the publishing process in the first place.'
required: true
env:
ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
PRISMA_TELEMETRY_INFORMATION: 'language-tools 5_e2e_tests.yml'
jobs:
tests:
name: Integration tests in VS Code folder with published LS
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
ref: ${{ github.event.inputs.branch }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install Dependencies
run: npm install && npm run bootstrap
- name: Compile
run: npm run compile
- name: Headless e2e tests
uses: coactions/setup-xvfb@v1
with:
run: npm run test
trigger:
name: Trigger next workflow
needs: [tests]
runs-on: ubuntu-latest
timeout-minutes: 7
if: always()
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Print inputs
run: |
echo ${{github.event.inputs.npm_channel}}
echo ${{github.event.inputs.extension_version}}
echo ${{github.event.inputs.branch}}
echo ${{github.event.inputs.trigger_reason}}
- name: Trigger next workflow to build extension
if: ${{ needs.tests.result == 'success' }}
uses: benc-uk/workflow-dispatch@v1
with:
workflow: 6. Build extension
token: ${{ secrets.GH_TOKEN }}
inputs: '{ "npm_channel": "${{ github.event.inputs.npm_channel }}", "extension_version": "${{ github.event.inputs.extension_version }}", "branch": "${{github.event.inputs.branch}}", "trigger_reason": "${{github.event.inputs.trigger_reason}}" }'
- 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: ${{ failure() || needs.tests.result == 'failure' }}
uses: rtCamp/action-slack-notify@v2.3.0
env:
SLACK_TITLE: '5. Integration tests in VSCode folder with published LS failed :x:'
SLACK_COLOR: '#FF0000'
SLACK_MESSAGE: '${{github.event.inputs.extension_version}} - ${{github.event.inputs.trigger_reason}} '
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_FAILURES }}
SLACK_CHANNEL: feed-language-tools-failures
SLACK_USERNAME: Prismo
SLACK_ICON_EMOJI: ':boom:'
SLACK_MSG_AUTHOR: prisma-bot