Data Explorer: Display duckdb error message when file fails to open (… #405
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: "Positron: CI - Merge to main" | |
on: | |
push: | |
branches: | |
- main | |
workflow_call: | |
inputs: | |
smoketest_target: | |
required: false | |
description: "Smoketest suite to run, e.g. smoketest-all or smoketest-pr" | |
default: "smoketest-all" | |
type: string | |
workflow_dispatch: | |
inputs: | |
smoketest_target: | |
required: false | |
description: "Smoketest suite to run, e.g. smoketest-all or smoketest-pr" | |
default: "smoketest-all" | |
type: string | |
env: | |
SMOKETEST_TARGET: ${{ inputs.smoketest_target || 'smoketest-all' }} | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
linux: | |
name: Tests on Linux | |
runs-on: ubuntu-latest-8x | |
timeout-minutes: 45 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
POSITRON_BUILD_NUMBER: 0 # CI skips building releases | |
_R_CHECK_FUTURE_FILE_TIMESTAMPS_: false # this check can be flaky in the R pkg tests | |
_R_CHECK_CRAN_INCOMING_: false | |
_R_CHECK_SYSTEM_CLOCK_: false | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
- name: Cache node_modules, build, extensions, and remote | |
uses: ./.github/actions/cache-multi-paths | |
- name: Setup Build and Compile | |
uses: ./.github/actions/setup-build-env | |
- name: Install Positron License | |
uses: ./.github/actions/install-license | |
with: | |
github-token: ${{ secrets.POSITRON_GITHUB_PAT }} | |
license-key: ${{ secrets.POSITRON_DEV_LICENSE }} | |
- name: Setup E2E Test Environment | |
uses: ./.github/actions/setup-test-env | |
with: | |
aws-role-to-assume: ${{ secrets.QA_AWS_RO_ROLE }} | |
aws-region: ${{ secrets.QA_AWS_REGION }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Compile Integration Tests | |
run: yarn --cwd test/integration/browser compile | |
- name: Run Unit Tests (node.js) | |
id: nodejs-unit-tests | |
run: yarn test-node | |
- name: Run Integration Tests (Electron) | |
id: electron-integration-tests | |
run: DISPLAY=:10 ./scripts/test-integration-pr.sh | |
- name: Run Smoke Tests (Electron) | |
if: success() || failure() | |
env: | |
POSITRON_PY_VER_SEL: 3.10.12 | |
POSITRON_R_VER_SEL: 4.4.0 | |
id: electron-smoke-tests | |
run: DISPLAY=:10 yarn ${{ env.SMOKETEST_TARGET }} --tracing --parallel --jobs 2 --skip-cleanup | |
- name: Convert XUnit to JUnit | |
id: xunit-to-junit | |
if: success() || failure() | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libxml2-utils | |
/usr/bin/xmllint --version | |
yarn xunit-to-junit smoke-tests-electron | |
- name: Set TestRail Run Title | |
id: set-testrail-run-title | |
if: always() | |
run: echo "TESTRAIL_TITLE=$(date +'%Y-%m-%d') Smoke Tests on branch $GITHUB_REF_NAME" >> $GITHUB_ENV | |
- name: Upload Test Results to TestRail | |
id: testrail-upload | |
if: always() | |
run: trcli --host "https://posit.testrail.io/" --project Positron --username testrailautomation@posit.co --key ${{ secrets.TESTRAIL_API_KEY}} parse_junit --file ".build/logs/smoke-tests-electron/test-results/results.xml" --case-matcher name --title "$TESTRAIL_TITLE" --close-run | |
- name: Upload run artifacts | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: run-artifacts | |
path: .build/logs/smoke-tests-electron/ | |
outputs: | |
target: ${{ env.SMOKETEST_TARGET }} | |
slack-notification: | |
name: "Send Slack notification" | |
runs-on: ubuntu-latest | |
needs: linux | |
if: ${{ failure() && needs.linux.outputs.target == 'smoketest-all' }} | |
steps: | |
- name: "Send Slack notification" | |
uses: testlabauto/action-test-results-to-slack@v0.0.6 | |
with: | |
github_token: ${{ secrets.POSITRON_GITHUB_PAT }} | |
slack_token: ${{ secrets.SMOKE_TESTS_SLACK_TOKEN }} | |
slack_channel: C07FR1JNZNJ #positron-test-results channel | |
suite_name: Positron Merge to Main Test Suite |