Skip to content

Commit

Permalink
Add rspec-specific GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zzaakiirr committed Jul 20, 2024
1 parent 594b706 commit 3df9da9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/rspec-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ on:
required: true
type: string
test-tag:
required: true
required: false
type: string
spec_paths:
required: false
type: string

jobs:
Expand Down Expand Up @@ -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()
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/rspec-specific.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: RSpec Specific

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

0 comments on commit 3df9da9

Please sign in to comment.