-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI Debugger has been deprecated, so remove its steps and standardize across platforms. Also start uploading flaky test info for macOS to prod and staging
- Loading branch information
1 parent
7df5bb3
commit 82ed959
Showing
8 changed files
with
88 additions
and
83 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,12 @@ inputs: | |
description: Additional args to append to the test invocation | ||
required: false | ||
default: actions/ -- | ||
trunk-token: | ||
description: CI debugger api token | ||
required: true | ||
trunk-staging-token: | ||
description: Test analytics staging api token (org token) | ||
required: false | ||
trunk-prod-token: | ||
description: Test analytics prod api token (org token) | ||
required: false | ||
|
||
runs: | ||
# TODO(Tyler): See if this can be converted to a js action | ||
|
@@ -49,7 +52,6 @@ runs: | |
working-directory: ${{ inputs.path }} | ||
|
||
- name: Run action tests | ||
if: runner.os == 'Windows' | ||
run: npm test ${{ inputs.append-args }} ${{ env.PLATFORM_APPEND_ARGS }} --passWithNoTests --ci | ||
shell: bash | ||
working-directory: ${{ inputs.path }} | ||
|
@@ -58,25 +60,21 @@ runs: | |
PLUGINS_TEST_CLI_VERSION: ${{ inputs.cli-version }} | ||
PLUGINS_TEST_CLI_PATH: ${{ env.CLI_PATH }} | ||
|
||
- name: Run action tests | ||
if: runner.os != 'Windows' | ||
uses: trunk-io/[email protected] | ||
- name: Upload prod results | ||
# TODO(Tyler): Add upload on Windows once the action supports it. | ||
if: "!cancelled() && runner.os != 'Windows' && inputs.trunk-prod-token != ''" | ||
uses: trunk-io/analytics-uploader@main | ||
with: | ||
breakpoint-id: trunk-plugins-action-tests | ||
shell: bash | ||
working-directory: ${{ inputs.path }} | ||
trunk-token: ${{ inputs.trunk-token }} | ||
org: trunk-staging-org | ||
run: | ||
npm test ${{ inputs.append-args }} ${{ env.PLATFORM_APPEND_ARGS }} --passWithNoTests --ci | ||
junit-paths: junit.xml | ||
org-slug: trunk | ||
token: ${{ inputs.trunk-prod-token }} | ||
continue-on-error: true | ||
env: | ||
JEST_SUITE_NAME: Action Tests | ||
PLUGINS_TEST_CLI_VERSION: ${{ inputs.cli-version }} | ||
PLUGINS_TEST_CLI_PATH: ${{ env.CLI_PATH }} | ||
TRUNK_PUBLIC_API_ADDRESS: https://api.trunk.io | ||
|
||
- name: Upload results | ||
# TODO(Tyler): Add upload on MacOS/Windows once the action supports it. | ||
if: "!cancelled() && runner.os == 'Linux'" | ||
- name: Upload staging results | ||
# TODO(Tyler): Add upload on Windows once the action supports it. | ||
if: "!cancelled() && runner.os != 'Windows' && inputs.trunk-staging-token != ''" | ||
uses: trunk-io/analytics-uploader@main | ||
with: | ||
junit-paths: junit.xml | ||
|
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 |
---|---|---|
|
@@ -23,9 +23,12 @@ inputs: | |
sourcery-token: | ||
description: Token to login for sourcery test | ||
required: true | ||
trunk-token: | ||
description: CI debugger api token (org token) | ||
required: true | ||
trunk-staging-token: | ||
description: Test analytics staging api token (org token) | ||
required: false | ||
trunk-prod-token: | ||
description: Test analytics prod api token (org token) | ||
required: false | ||
ref-type: | ||
description: release or main | ||
required: false | ||
|
@@ -92,7 +95,6 @@ runs: | |
working-directory: ${{ inputs.path }} | ||
|
||
- name: Run plugin tests | ||
if: runner.os == 'Windows' | ||
run: npm test ${{ inputs.append-args }} ${{ env.PLATFORM_APPEND_ARGS }} --ci | ||
shell: bash | ||
working-directory: ${{ inputs.path }} | ||
|
@@ -107,30 +109,21 @@ runs: | |
JEST_JUNIT_SUITE_NAME: | ||
"{title} ${{ runner.os }} ${{ inputs.ref-type }} ${{ inputs.linter-version }}" | ||
|
||
- name: Run plugin tests | ||
if: runner.os != 'Windows' | ||
# trunk-ignore(semgrep/yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha.third-party-action-not-pinned-to-commit-sha) | ||
uses: trunk-io/[email protected] | ||
- name: Upload prod results | ||
# TODO(Tyler): Add upload on Windows once the action supports it. | ||
if: "!cancelled() && runner.os != 'Windows' && inputs.trunk-prod-token != ''" | ||
uses: trunk-io/analytics-uploader@main | ||
with: | ||
breakpoint-id: trunk-plugins-linter-tests | ||
shell: bash | ||
working-directory: ${{ inputs.path }} | ||
trunk-token: ${{ inputs.trunk-token }} | ||
org: trunk-staging-org | ||
run: npm test ${{ inputs.append-args }} ${{ env.PLATFORM_APPEND_ARGS }} --ci --runInBand | ||
junit-paths: junit.xml | ||
org-slug: trunk | ||
token: ${{ inputs.trunk-prod-token }} | ||
continue-on-error: true | ||
env: | ||
PLUGINS_TEST_LINTER_VERSION: ${{ inputs.linter-version }} | ||
PLUGINS_TEST_CLI_VERSION: ${{ inputs.cli-version }} | ||
PLUGINS_TEST_CLI_PATH: ${{ env.CLI_PATH }} | ||
SOURCERY_TOKEN: ${{ inputs.sourcery-token }} | ||
DEBUG: Driver:nixpkgs-fmt:*, Driver:eslint:* | ||
JEST_SUITE_NAME: Linter Tests | ||
JEST_JUNIT_SUITE_NAME: | ||
"{title} ${{ runner.os }} ${{ inputs.ref-type }} ${{ env.JEST_LINTER_VERSION }}" | ||
TRUNK_PUBLIC_API_ADDRESS: https://api.trunk.io | ||
|
||
- name: Upload results | ||
# TODO(Tyler): Add upload on MacOS/Windows once the action supports it. | ||
if: "!cancelled() && runner.os == 'Linux'" | ||
- name: Upload staging results | ||
# TODO(Tyler): Add upload on Windows once the action supports it. | ||
if: "!cancelled() && runner.os != 'Windows' && inputs.trunk-staging-token != ''" | ||
uses: trunk-io/analytics-uploader@main | ||
with: | ||
junit-paths: junit.xml | ||
|
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 |
---|---|---|
|
@@ -16,9 +16,12 @@ inputs: | |
description: Additional args to append to the test invocation | ||
required: false | ||
default: tools -- | ||
trunk-token: | ||
description: CI debugger api token (org token) | ||
required: true | ||
trunk-staging-token: | ||
description: Test analytics staging api token (org token) | ||
required: false | ||
trunk-prod-token: | ||
description: Test analytics prod api token (org token) | ||
required: false | ||
ref-type: | ||
description: release or main | ||
required: false | ||
|
@@ -65,7 +68,6 @@ runs: | |
working-directory: ${{ inputs.path }} | ||
|
||
- name: Run plugin tests | ||
if: runner.os == 'Windows' | ||
run: npm test ${{ inputs.append-args }} ${{ env.PLATFORM_APPEND_ARGS }} --ci | ||
shell: bash | ||
working-directory: ${{ inputs.path }} | ||
|
@@ -75,26 +77,21 @@ runs: | |
JEST_SUITE_NAME: Tool Tests | ||
JEST_JUNIT_SUITE_NAME: "{title} ${{ runner.os }} ${{ inputs.ref-type }}" | ||
|
||
- name: Run plugin tests | ||
if: runner.os != 'Windows' | ||
# trunk-ignore(semgrep/yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha.third-party-action-not-pinned-to-commit-sha) | ||
uses: trunk-io/[email protected] | ||
- name: Upload prod results | ||
# TODO(Tyler): Add upload on Windows once the action supports it. | ||
if: "!cancelled() && runner.os != 'Windows' && inputs.trunk-prod-token != ''" | ||
uses: trunk-io/analytics-uploader@main | ||
with: | ||
breakpoint-id: trunk-plugins-tool-tests | ||
shell: bash | ||
working-directory: ${{ inputs.path }} | ||
trunk-token: ${{ inputs.trunk-token }} | ||
org: trunk-staging-org | ||
run: npm test ${{ inputs.append-args }} ${{ env.PLATFORM_APPEND_ARGS }} --ci | ||
junit-paths: junit.xml | ||
org-slug: trunk | ||
token: ${{ inputs.trunk-prod-token }} | ||
continue-on-error: true | ||
env: | ||
PLUGINS_TEST_CLI_VERSION: ${{ inputs.cli-version }} | ||
PLUGINS_TEST_CLI_PATH: ${{ env.CLI_PATH }} | ||
JEST_SUITE_NAME: Tool Tests | ||
JEST_JUNIT_SUITE_NAME: "{title} ${{ runner.os }} ${{ inputs.ref-type }}" | ||
TRUNK_PUBLIC_API_ADDRESS: https://api.trunk.io | ||
|
||
- name: Upload results | ||
# TODO(Tyler): Add upload on MacOS/Windows once the action supports it. | ||
if: "!cancelled() && runner.os == 'Linux'" | ||
- name: Upload staging results | ||
# TODO(Tyler): Add upload on Windows once the action supports it. | ||
if: "!cancelled() && runner.os != 'Windows' && inputs.trunk-staging-token != ''" | ||
uses: trunk-io/analytics-uploader@main | ||
with: | ||
junit-paths: junit.xml | ||
|
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
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