-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
224 additions
and
4 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,45 @@ on: | |
# This job runs at 00:00 UTC every day. | ||
- cron: '0 0 * * *' | ||
|
||
env: | ||
LAUNCHABLE_TEST_REPORTS: "launchable-test-reports.xml" | ||
# GITHUB_PULL_REQUEST_URL are used for commenting test reports in Launchable Github App. | ||
# https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/link.py#L42 | ||
GITHUB_PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }} | ||
# The following envs are necessary in Launchable tokenless authentication. | ||
# https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/authentication.py#L20 | ||
LAUNCHABLE_ORGANIZATION: "ruby" | ||
LAUNCHABLE_WORKSPACE: "vscode-rdbg" | ||
# https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/authentication.py#L71 | ||
GITHUB_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
# Set fetch-depth: 0 so that Launchable can receive commits information. | ||
fetch-depth: 0 | ||
# Launchable requires Python and Java | ||
# https://www.launchableinc.com/docs/resources/cli-reference/ | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '8' | ||
- name: Setup Launchable | ||
run: | | ||
pip install launchable | ||
launchable verify | ||
: # The build name must be a unique identifier for this build. Therefore, $GITHUB_RUN_ID is appropriate in this case. | ||
: # https://www.launchableinc.com/docs/sending-data-to-launchable/using-the-launchable-cli/recording-builds-with-the-launchable-cli/ | ||
launchable record build --name "$GITHUB_RUN_ID" | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
|
@@ -22,3 +55,6 @@ jobs: | |
- run: gem install debug | ||
- run: npm install @types/[email protected] | ||
- run: xvfb-run -a npm run ui-test | ||
- name: Record tests with Launchable | ||
run: launchable record tests --flavor os=ubuntu-latest --flavor test=e2e_test file $LAUNCHABLE_TEST_REPORTS | ||
if: always() |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
import { MochaOptions } from "vscode-extension-tester"; | ||
|
||
const options: MochaOptions = { | ||
timeout: 180000, | ||
timeout: 180000, | ||
}; | ||
|
||
const testReports = process.env.LAUNCHABLE_TEST_REPORTS; | ||
if (testReports) { | ||
options.reporter = "mocha-junit-reporter"; | ||
options.reporterOptions = { | ||
mochaFile: testReports, | ||
}; | ||
} | ||
|
||
module.exports = options; |