Skip to content

ci: add ability to run additional test tags against PRs #110

ci: add ability to run additional test tags against PRs

ci: add ability to run additional test tags against PRs #110

name: "Test: PR Merge"
on:
pull_request:
branches:
- main
- 'prerelease/**'
push:
branches:
- main
- 'prerelease/**'
permissions:
id-token: write
contents: read
jobs:
test:
uses: ./.github/workflows/e2e-linux.yml
with:
grep: "@pr"
project: "e2e-electron"
secrets: inherit
# unit-tests:
# runs-on: ubuntu-latest
# timeout-minutes: 30
# 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 }}
# # one unit test needs this: Can list tables and fields from R connections
# - name: Setup R
# uses: ./.github/actions/install-r
# with:
# version: "4.4.0"
# - name: Run Unit Tests (Electron)
# id: electron-unit-tests
# run: DISPLAY=:10 ./scripts/test.sh
# - name: Run Unit Tests (node.js)
# id: nodejs-unit-tests
# run: yarn test-node
# - name: Run Unit Tests (Browser, Chromium)
# id: browser-unit-tests
# run: DISPLAY=:10 yarn test-browser-no-install --browser chromium
# integration-tests:
# runs-on: ubuntu-latest-4x
# timeout-minutes: 30
# 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 }}
# # one integration test needs this: Connections pane works for R
# - name: Setup R
# uses: ./.github/actions/install-r
# with:
# version: "4.4.0"
# - name: Compile Integration Tests
# run: yarn --cwd test/integration/browser compile
# - name: Run Integration Tests (Electron)
# id: electron-integration-tests
# run: DISPLAY=:10 ./scripts/test-integration-pr.sh
# - name: Run Integration Tests (Remote)
# if: ${{ job.status != 'cancelled' && (success() || failure()) }}
# id: electron-remote-integration-tests
# run: DISPLAY=:10 ./scripts/test-remote-integration.sh
# - name: Run Integration Tests (Browser, Chromium)
# if: ${{ job.status != 'cancelled' && (success() || failure()) }}
# id: browser-integration-tests
# run: DISPLAY=:10 ./scripts/test-web-integration.sh --browser chromium
slack-notify:
# if: ${{ failure() && inputs.e2e_grep == '' }}
# needs: [unit-tests, integration-tests, e2e-electron]
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Send Slack Notification
uses: midleman/slack-workflow-status@master
with:
repo_token: ${{ secrets.POSITRON_GITHUB_PAT }}
slack_webhook_url: ${{ secrets.SLACK_MARIE_WEBHOOK_URL }}
notify_on: "failure"