diff --git a/.github/workflows/rspec-shared.yml b/.github/workflows/rspec-shared.yml index b9be9b80..c786c2cf 100644 --- a/.github/workflows/rspec-shared.yml +++ b/.github/workflows/rspec-shared.yml @@ -10,7 +10,10 @@ on: required: true type: string test-tag: - required: true + required: false + type: string + spec_paths: + required: false type: string jobs: @@ -41,7 +44,7 @@ jobs: cpln profile create default --token $CPLN_TOKEN_CI --org $CPLN_ORG cpln image docker-login - name: Run tests - run: bundle exec rspec --format documentation --tag ${{ inputs.test-tag }} + run: bundle exec rspec --format documentation ${{ inputs.test-tag && format('--tag {0}', inputs.test-tag) }} ${{ inputs.spec_paths }} - name: Upload spec log uses: actions/upload-artifact@master if: always() diff --git a/.github/workflows/rspec-specific.yml b/.github/workflows/rspec-specific.yml new file mode 100644 index 00000000..a9c14c4d --- /dev/null +++ b/.github/workflows/rspec-specific.yml @@ -0,0 +1,18 @@ +name: RSpec + +on: + workflow_dispatch: + inputs: + spec_paths: + description: "Test files or directories that should be run" + required: true + +jobs: + rspec-specific-tests: + name: RSpec (Specific) + uses: ./.github/workflows/rspec-shared.yml + with: + os-version: ubuntu-latest + ruby-version: "3.2" + spec_paths: ${{ inputs.spec_paths }} + secrets: inherit