Skip to content

Commit

Permalink
Add Breakpoint (trunk-io#348)
Browse files Browse the repository at this point in the history
Enable breakpoint on linter tests.
  • Loading branch information
pat-trunk-io committed Jul 13, 2023
1 parent 90dead9 commit 60fbade
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
13 changes: 10 additions & 3 deletions .github/actions/linter_tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ inputs:
sourcery-token:
description: Token to login for sourcery test
required: true
trunk-token:
description: CI debugger api token
required: true

runs:
# TODO(Tyler): See if this can be converted to a js action
Expand Down Expand Up @@ -58,9 +61,13 @@ runs:
working-directory: ${{ inputs.path }}

- name: Run plugin tests
run: npm test --ci ${{ inputs.append-args }}
shell: bash
working-directory: ${{ inputs.path }}
uses: trunk-io/breakpoint@v1
with:
breakpoint-id: trunk-plugins-linter-tests
shell: bash
working-directory: ${{ inputs.path }}
trunk-token: ${{ inputs.trunk-token }}
run: npm test --ci ${{ inputs.append-args }}
env:
PLUGINS_TEST_LINTER_VERSION: ${{ inputs.linter-version }}
PLUGINS_TEST_CLI_VERSION: ${{ inputs.cli-version }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ jobs:
name: Plugin Tests
runs-on: ${{ matrix.os }}
needs: detect_changes
permissions:
pull-requests: write
if:
needs.detect_changes.outputs.linters == 'true' || needs.detect_changes.outputs.all-linters ==
'linters' || needs.detect_changes.outputs.tools == 'true' ||
Expand Down Expand Up @@ -118,6 +120,7 @@ jobs:
append-args:
${{ needs.detect_changes.outputs.all-linters }} ${{
needs.detect_changes.outputs.linters-files }}
trunk-token: ${{ secrets.TRUNK_DEBUGGER_TOKEN }}

- name: Linter Tests Latest
# Run tests on Latest with any modified linters (see filters.yaml). Don't run when cancelled.
Expand All @@ -130,6 +133,7 @@ jobs:
sourcery-token: ${{ secrets.TRUNK_SOURCERY_TOKEN }}
# TODO(Tyler): We need downloads to work with known_bad_versions
append-args: ${{needs.detect_changes.outputs.linters-files }}
trunk-token: ${{ secrets.TRUNK_DEBUGGER_TOKEN }}

- name: Tool Tests
# Run tests using KnownGoodVersion with any modified tools and conditionally all tools. Don't run when cancelled.
Expand Down
3 changes: 2 additions & 1 deletion .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ version: 0.1

# version used for local trunk runs and testing
cli:
version: 1.11.2-beta.17
version: 1.11.2-beta.33

api:
address: api.trunk-staging.io:8443
org: trunk-staging-org

plugins:
sources:
Expand Down

0 comments on commit 60fbade

Please sign in to comment.