Skip to content

Commit

Permalink
(Chore): Various repo cleanup and support quarantining (#905)
Browse files Browse the repository at this point in the history
Clean up some old todos and change the nightly+weekly cadences slightly
to hopefully be less flaky. Also adds the setup needed to support
quarantining

Successful
[run](https://github.com/trunk-io/plugins/actions/runs/11678088415/job/32517018048?pr=905)
verifying intended functionality
  • Loading branch information
TylerJang27 authored Nov 13, 2024
1 parent c45aa94 commit cf4a9c5
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 20 deletions.
3 changes: 2 additions & 1 deletion .github/actions/action_tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ runs:
run: npm test ${{ inputs.append-args }} ${{ env.PLATFORM_APPEND_ARGS }} --passWithNoTests --ci
shell: bash
working-directory: ${{ inputs.path }}
continue-on-error: true
env:
JEST_SUITE_NAME: Action Tests
PLUGINS_TEST_CLI_VERSION: ${{ inputs.cli-version }}
Expand All @@ -80,6 +81,6 @@ runs:
junit-paths: junit.xml
org-slug: trunk-staging-org
token: ${{ inputs.trunk-staging-token }}
continue-on-error: true
quarantine: true
env:
TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io
5 changes: 3 additions & 2 deletions .github/actions/linter_tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,14 @@ runs:
run: npm test ${{ inputs.append-args }} ${{ env.PLATFORM_APPEND_ARGS }} --ci
shell: bash
working-directory: ${{ inputs.path }}
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 recurrent eslint circular JSON errors
DEBUG: Driver:eslint:*,Driver:nixpkgs-fmt:*
DEBUG: Driver:eslint:*,Driver:nixpkgs-fmt:*,Driver:trunk-toolbox:*
JEST_SUITE_NAME: Linter Tests
JEST_JUNIT_SUITE_NAME:
"{title} ${{ runner.os }} ${{ inputs.ref-type }} ${{ inputs.linter-version }}"
Expand All @@ -129,6 +130,6 @@ runs:
junit-paths: junit.xml
org-slug: trunk-staging-org
token: ${{ inputs.trunk-staging-token }}
continue-on-error: true
quarantine: true
env:
TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io
3 changes: 2 additions & 1 deletion .github/actions/tool_tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ runs:
run: npm test ${{ inputs.append-args }} ${{ env.PLATFORM_APPEND_ARGS }} --ci
shell: bash
working-directory: ${{ inputs.path }}
continue-on-error: true
env:
PLUGINS_TEST_CLI_VERSION: ${{ inputs.cli-version }}
PLUGINS_TEST_CLI_PATH: ${{ env.CLI_PATH }}
Expand All @@ -97,6 +98,6 @@ runs:
junit-paths: junit.xml
org-slug: trunk-staging-org
token: ${{ inputs.trunk-staging-token }}
continue-on-error: true
quarantine: true
env:
TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io
9 changes: 2 additions & 7 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ updates:
schedule:
interval: weekly
day: sunday
# trunk-ignore(yamllint/quoted-strings)
time: "08:00" # UTC
time: "10:00" # UTC
groups:
dependencies:
patterns:
Expand All @@ -18,13 +17,9 @@ updates:
schedule:
interval: weekly
day: sunday
# trunk-ignore(yamllint/quoted-strings)
time: "08:00" # UTC
time: "10:00" # UTC
groups:
dependencies:
patterns:
- "*"
# TODO(Tyler): Readd once eslint9 is resolved.
ignore:
- dependency-name: eslint
open-pull-requests-limit: 2
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Nightly
on:
schedule:
# Times in UTC (PST+8), this translates to running Mon-Fri at midnight/1am (depending on DST)
- cron: 0 8 * * 1-5
# Times in UTC (PST+8), this translates to running Mon-Fri at 2am/3am (depending on DST)
- cron: 0 10 * * 1-5
# Only enable on pull requests for testing
# pull_request:
# paths: [.github/workflows/nightly.yaml]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/upgrade_trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Upgrade Trunk Weekly
on:
schedule:
# Weekly at midnight W morning
- cron: 0 8 * * 3
# Weekly W morning
- cron: 0 10 * * 3
workflow_dispatch: {}

permissions: read-all
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_nightly.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Windows Tests
on:
# TODO(Tyler): Preserve this workflow for testing, but in the future we'll want to remove it.
# NOTE(Tyler): Preserve this workflow for testing, but in the future we'll want to remove it.
workflow_dispatch: {}

permissions: read-all
Expand Down
1 change: 0 additions & 1 deletion linters/ansible-lint/plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: 0.1
tools:
definitions:
# TODO(Tyler): Once we can make ansible its own tool without breaking upgrade, this should be extracted into its own tool directory
- name: ansible-lint
runtime: python
package: ansible-lint
Expand Down
1 change: 0 additions & 1 deletion linters/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ lint:

- name: postcss
extensions:
# TODO(Tyler): Do we want to include css here as well?
- pcss
- postcss

Expand Down
2 changes: 2 additions & 0 deletions linters/scalafmt/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ lint:
parse_regex: scalafmt ${semver}
run: scalafmt --version
known_good_version: 3.4.3
# We don't support this semver format, and it's a prerelease
known_bad_versions: [3.8.4-RC1]
3 changes: 1 addition & 2 deletions tests/utils/landing_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ const normalizePlatformPath = (originalPath: string | undefined) => {
return originalPath;
};

// TODO(Tyler): These extract functions are used to filter down to deterministic fields. In the future
// we should preserve the original structure and use jest matchers on the non-deterministic fields.
// These extract functions are used to filter down to deterministic fields.
const extractLintActionFields = ({
actionDurationMs: _actionDurationMs,
cacheHit: _cacheHit,
Expand Down

0 comments on commit cf4a9c5

Please sign in to comment.