Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support additional setup in ruby pipelines #318

Merged
merged 43 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7bd3414
Add additional setup
ryanwi Sep 18, 2024
63af4ba
add shell
ryanwi Sep 18, 2024
7cd5d88
use gha setup python
ryanwi Sep 18, 2024
01cdd37
use gha setup python
ryanwi Sep 18, 2024
aae3046
use gha setup python
ryanwi Sep 18, 2024
577a484
use gha setup python
ryanwi Sep 18, 2024
4df58af
use gha setup python
ryanwi Sep 18, 2024
12657d5
install
ryanwi Sep 18, 2024
4c5c812
install
ryanwi Sep 18, 2024
2ce57c0
install
ryanwi Sep 18, 2024
8c6a6bd
install
ryanwi Sep 18, 2024
d9ce421
faster debug
ryanwi Sep 18, 2024
63f359a
install
ryanwi Sep 18, 2024
66fdf96
cache working
ryanwi Sep 18, 2024
bc1e37d
faster debug
ryanwi Sep 18, 2024
293b816
faster debug
ryanwi Sep 18, 2024
10f193b
faster debug
ryanwi Sep 18, 2024
6a6dc60
faster debug
ryanwi Sep 18, 2024
937d34a
faster debug
ryanwi Sep 18, 2024
cd32dd2
faster debug
ryanwi Sep 18, 2024
5d2ff4b
faster debug
ryanwi Sep 18, 2024
b7b0e7c
Update .github/workflows/ci.yml
ryanwi Sep 18, 2024
4f560b8
Update .github/workflows/ci.yml
ryanwi Sep 18, 2024
0b654f1
Update .github/workflows/ci-check.yml
ryanwi Sep 18, 2024
1ac67ec
Update .github/workflows/ci-build.yml
ryanwi Sep 18, 2024
8269491
Revert "Update .github/workflows/ci-build.yml"
ryanwi Sep 18, 2024
a1435dc
Revert "Update .github/workflows/ci-check.yml"
ryanwi Sep 18, 2024
3b64afa
Revert "Update .github/workflows/ci.yml"
ryanwi Sep 18, 2024
60292c4
Revert "Update .github/workflows/ci.yml"
ryanwi Sep 18, 2024
aa3cfcf
use env var
ryanwi Sep 18, 2024
c80639e
use env var
ryanwi Sep 18, 2024
17291aa
use env var
ryanwi Sep 18, 2024
856ae10
more testing
ryanwi Sep 18, 2024
38b6a45
more testing
ryanwi Sep 18, 2024
f5b0e62
more testing
ryanwi Sep 18, 2024
72ada17
more testing
ryanwi Sep 18, 2024
3579293
more testing
ryanwi Sep 18, 2024
6e7be07
no eval
ryanwi Sep 18, 2024
a8bd2e4
use eval
ryanwi Sep 18, 2024
7c288d2
done testing
ryanwi Sep 18, 2024
f64d762
one more time without eval
ryanwi Sep 19, 2024
d6c0fb8
all specs
ryanwi Sep 19, 2024
6e5f999
remove branches
ryanwi Sep 19, 2024
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
14 changes: 14 additions & 0 deletions .github/actions/test-ruby/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ inputs:
required: false
description: Reviewdog report
default: 'false'
ADDITIONAL_SETUP:
type: string
default: '[]'
description: 'JSON array of additional setup commands'

runs:
using: "composite"
Expand All @@ -44,6 +48,16 @@ runs:
bundler-cache: true
ruby-version: ${{ inputs.RUBY_VERSION }}

- name: Additional Setup
if: inputs.ADDITIONAL_SETUP != '[]'
shell: bash
run: |
additional_setup='${{ inputs.ADDITIONAL_SETUP }}'
echo "$additional_setup" | jq -r '.[]' | while read -r command; do
echo "Executing additional setup command: $command"
eval "$command"
done

- uses: actions/cache@v4
with:
path: vendor/bundle
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: signalwire/actions-template
ref: main
ref: ryanwi/additional-setup
ryanwi marked this conversation as resolved.
Show resolved Hide resolved
path: actions

- uses: ./actions/.github/actions/gpg
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/ci-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ on:
RUBY_RAKE_COMMANDS:
type: string
description: A comma-separated list of rake commands.
ADDITIONAL_SETUP:
type: string
default: '[]'
description: 'JSON array of additional setup commands'
ZEITWERK:
type: boolean
description: Zeitwerk run.
Expand Down Expand Up @@ -152,7 +156,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: signalwire/actions-template
ref: main
ref: ryanwi/additional-setup
ryanwi marked this conversation as resolved.
Show resolved Hide resolved
path: actions

- name: Retrieve Secrets from HashiCorp Vault
Expand Down Expand Up @@ -199,6 +203,7 @@ jobs:
RUBY_VERSION: ${{ inputs.RUBY_VERSION }}
ENV_PATH: ${{ inputs.ENV_PATH }}
RUBY_RAKE_COMMANDS: ${{ inputs.RUBY_RAKE_COMMANDS }}
ADDITIONAL_SETUP: ${{ inputs.ADDITIONAL_SETUP }}
ZEITWERK: ${{ inputs.ZEITWERK }}
BRAKEMAN: ${{ inputs.BRAKEMAN }}
RUBOCOP: ${{ inputs.RUBOCOP }}
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ on:
RUBY_RAKE_COMMANDS:
type: string
description: A comma-separated list of rake commands.
ADDITIONAL_SETUP:
type: string
default: '[]'
description: 'JSON array of additional setup commands'
ZEITWERK:
type: boolean
description: Zeitwerk run.
Expand Down Expand Up @@ -212,7 +216,7 @@ jobs:

CHECK:
name: CI
uses: signalwire/actions-template/.github/workflows/ci-check.yml@main
uses: signalwire/actions-template/.github/workflows/ci-check.yml@ryanwi/additional-setup
ryanwi marked this conversation as resolved.
Show resolved Hide resolved
with:
ENVIRONMENT: ${{ inputs.ENVIRONMENT }}
PROJECT_NAME: ${{ inputs.PROJECT_NAME }}
Expand All @@ -229,6 +233,7 @@ jobs:
ENV_PATH: ${{ inputs.ENV_PATH }}
TEST_CREATE_NETWORK: ${{ inputs.TEST_CREATE_NETWORK }}
RUBY_RAKE_COMMANDS: ${{ inputs.RUBY_RAKE_COMMANDS }}
ADDITIONAL_SETUP: ${{ inputs.ADDITIONAL_SETUP }}
ZEITWERK: ${{ inputs.ZEITWERK }}
BRAKEMAN: ${{ inputs.BRAKEMAN }}
RUBOCOP: ${{ inputs.RUBOCOP }}
Expand All @@ -250,7 +255,7 @@ jobs:
BUILD:
name: BUILD
needs: CHECK
uses: signalwire/actions-template/.github/workflows/ci-build.yml@main
uses: signalwire/actions-template/.github/workflows/ci-build.yml@ryanwi/additional-setup
ryanwi marked this conversation as resolved.
Show resolved Hide resolved
with:
ENVIRONMENT: ${{ inputs.ENVIRONMENT }}
PROJECT_NAME: ${{ inputs.PROJECT_NAME }}
Expand Down