Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
1. Replace `-` with `_` for inputs
2. Rename rspec-specific-tests to rspec-specific
  • Loading branch information
zzaakiirr committed Jul 23, 2024
1 parent 3df9da9 commit d9b0319
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/command_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
ruby_version: "3.2"
bundler-cache: true
- name: Install dependencies
run: bundle install
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/rspec-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ name: RSpec Shared
on:
workflow_call:
inputs:
os-version:
os_version:
required: true
type: string
ruby-version:
ruby_version:
required: true
type: string
test-tag:
test_tag:
required: false
type: string
spec_paths:
Expand All @@ -18,7 +18,7 @@ on:

jobs:
rspec:
runs-on: ${{ inputs.os-version }}
runs-on: ${{ inputs.os_version }}
env:
RAILS_ENV: test
# We have to add "_CI" to the end, otherwise it messes with tests where we switch profiles,
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ inputs.ruby-version }}
ruby_version: ${{ inputs.ruby_version }}
bundler-cache: true
- name: Install dependencies
run: bundle install
Expand All @@ -44,16 +44,16 @@ 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 ${{ inputs.test-tag && format('--tag {0}', inputs.test-tag) }} ${{ inputs.spec_paths }}
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()
with:
name: spec-${{ inputs.test-tag }}-${{ github.run_id }}-${{ inputs.os-version }}-${{ inputs.ruby-version }}.log
name: spec-${{ inputs.test_tag }}-${{ github.run_id }}-${{ inputs.os_version }}-${{ inputs.ruby_version }}.log
path: spec.log
- name: Upload coverage results
uses: actions/upload-artifact@master
if: always()
with:
name: coverage-report-${{ inputs.test-tag }}-${{ github.run_id }}-${{ inputs.os-version }}-${{ inputs.ruby-version }}
name: coverage-report-${{ inputs.test_tag }}-${{ github.run_id }}-${{ inputs.os_version }}-${{ inputs.ruby_version }}
path: coverage
6 changes: 3 additions & 3 deletions .github/workflows/rspec-specific.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ on:
required: true

jobs:
rspec-specific-tests:
rspec-specific:
name: RSpec (Specific)
uses: ./.github/workflows/rspec-shared.yml
with:
os-version: ubuntu-latest
ruby-version: "3.2"
os_version: ubuntu-latest
ruby_version: "3.2"
spec_paths: ${{ inputs.spec_paths }}
secrets: inherit
12 changes: 6 additions & 6 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ jobs:
name: RSpec (Fast)
uses: ./.github/workflows/rspec-shared.yml
with:
os-version: ubuntu-latest
ruby-version: "3.2"
test-tag: ~slow
os_version: ubuntu-latest
ruby_version: "3.2"
test_tag: ~slow
secrets: inherit

rspec-slow:
name: RSpec (Slow)
uses: ./.github/workflows/rspec-shared.yml
if: github.event_name == 'workflow_dispatch'
with:
os-version: ubuntu-latest
ruby-version: "3.2"
test-tag: slow
os_version: ubuntu-latest
ruby_version: "3.2"
test_tag: slow
secrets: inherit

0 comments on commit d9b0319

Please sign in to comment.