Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/discourse-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ on:
container:
type: string
required: false
skip_linting:
description: "Skip the linting job."
type: boolean
required: false
default: false
skip_annotations:
description: "Skip the annotation checks in the test matrix."
type: boolean
required: false
default: false
secrets:
ssh_private_key:
description: "Optional SSH private key to be used when cloning additional plugin repos"
Expand All @@ -38,6 +48,7 @@ defaults:

jobs:
linting:
if: ${{ !inputs.skip_linting }}
runs-on: ${{ inputs.runs_on }}
container: ${{ inputs.container || 'discourse/discourse_test:slim' }}

Expand Down Expand Up @@ -167,6 +178,8 @@ jobs:
id: check_tests
shell: ruby {0}
working-directory: tmp/plugin
env:
SKIP_ANNOTATIONS: ${{ inputs.skip_annotations }}
run: |
require 'json'

Expand All @@ -175,7 +188,7 @@ jobs:
matrix << 'frontend' if Dir.glob("test/javascripts/**/*.{js,gjs}").any?
matrix << 'backend'
matrix << 'system' if Dir.glob("spec/system/**/*.rb").any?
matrix << 'annotations' if Dir.glob("app/models/**/*.rb").reject { _1.match?("concerns") }.any?
matrix << 'annotations' if ENV["SKIP_ANNOTATIONS"] != "true" && Dir.glob("app/models/**/*.rb").reject { _1.match?("concerns") }.any?

puts "Running jobs: #{matrix.inspect}"

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/discourse-theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ on:
container:
type: string
required: false
skip_linting:
description: "Skip the linting job."
type: boolean
required: false
default: false
secrets:
ssh_private_key:
description: "Optional SSH private key to be used when cloning additional plugin repos"
Expand All @@ -35,6 +40,7 @@ defaults:

jobs:
linting:
if: ${{ !inputs.skip_linting }}
runs-on: ${{ inputs.runs_on }}
container: ${{ inputs.container || 'discourse/discourse_test:slim' }}

Expand Down
Loading