diff --git a/.github/workflows/aggregate_root.yml b/.github/workflows/aggregate_root.yml index 441eb39bd6..bc6be3f175 100644 --- a/.github/workflows/aggregate_root.yml +++ b/.github/workflows/aggregate_root.yml @@ -18,7 +18,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: aggregate_root - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false matrix: @@ -49,7 +50,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: aggregate_root - BUNDLE_GEMFILE: Gemfile + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false steps: diff --git a/.github/workflows/dres_client.yml b/.github/workflows/dres_client.yml index 07e88e5b35..932155a7a6 100644 --- a/.github/workflows/dres_client.yml +++ b/.github/workflows/dres_client.yml @@ -24,7 +24,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/dres_client - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false matrix: diff --git a/.github/workflows/dres_rails.yml b/.github/workflows/dres_rails.yml index 459fa1f28f..3704b22677 100644 --- a/.github/workflows/dres_rails.yml +++ b/.github/workflows/dres_rails.yml @@ -24,8 +24,10 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/dres_rails - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} - DATABASE_URL: ${{ matrix.database_url }} + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" + DATABASE_URL: "${{ matrix.database_url }}" + DATA_TYPE: "${{ matrix.data_type }}" services: postgres_11: image: postgres:11 diff --git a/.github/workflows/minitest-ruby_event_store.yml b/.github/workflows/minitest-ruby_event_store.yml index 364d1d2131..53570f0875 100644 --- a/.github/workflows/minitest-ruby_event_store.yml +++ b/.github/workflows/minitest-ruby_event_store.yml @@ -20,7 +20,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/minitest-ruby_event_store - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false matrix: @@ -47,7 +48,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/minitest-ruby_event_store - BUNDLE_GEMFILE: Gemfile + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false steps: diff --git a/.github/workflows/rails_event_store.yml b/.github/workflows/rails_event_store.yml index e340dcdc35..174d3fca93 100644 --- a/.github/workflows/rails_event_store.yml +++ b/.github/workflows/rails_event_store.yml @@ -18,7 +18,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: rails_event_store - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false matrix: @@ -53,7 +54,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: rails_event_store - BUNDLE_GEMFILE: Gemfile + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false steps: diff --git a/.github/workflows/ruby_event_store-active_record.yml b/.github/workflows/ruby_event_store-active_record.yml index a07a8763ba..651c62e165 100644 --- a/.github/workflows/ruby_event_store-active_record.yml +++ b/.github/workflows/ruby_event_store-active_record.yml @@ -18,9 +18,10 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: ruby_event_store-active_record - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} - DATABASE_URL: ${{ matrix.database_url }} - DATA_TYPE: ${{ matrix.data_type }} + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" + DATABASE_URL: "${{ matrix.database_url }}" + DATA_TYPE: "${{ matrix.data_type }}" services: postgres_11: image: postgres:11 @@ -122,7 +123,10 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: ruby_event_store-active_record - BUNDLE_GEMFILE: Gemfile + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" + DATABASE_URL: "${{ matrix.database_url }}" + DATA_TYPE: "${{ matrix.data_type }}" strategy: fail-fast: false steps: diff --git a/.github/workflows/ruby_event_store-browser.yml b/.github/workflows/ruby_event_store-browser.yml index 7a528d4638..41a5fb8d3f 100644 --- a/.github/workflows/ruby_event_store-browser.yml +++ b/.github/workflows/ruby_event_store-browser.yml @@ -18,7 +18,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: ruby_event_store-browser - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false matrix: @@ -60,7 +61,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: ruby_event_store-browser - BUNDLE_GEMFILE: Gemfile + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false steps: diff --git a/.github/workflows/ruby_event_store-flipper.yml b/.github/workflows/ruby_event_store-flipper.yml index 42f9142038..1c6d415601 100644 --- a/.github/workflows/ruby_event_store-flipper.yml +++ b/.github/workflows/ruby_event_store-flipper.yml @@ -20,7 +20,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/ruby_event_store-flipper - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false matrix: @@ -53,7 +54,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/ruby_event_store-flipper - BUNDLE_GEMFILE: Gemfile + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false steps: diff --git a/.github/workflows/ruby_event_store-newrelic.yml b/.github/workflows/ruby_event_store-newrelic.yml index 12bcd4fe60..ec873dd9d8 100644 --- a/.github/workflows/ruby_event_store-newrelic.yml +++ b/.github/workflows/ruby_event_store-newrelic.yml @@ -20,7 +20,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/ruby_event_store-newrelic - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false matrix: @@ -49,7 +50,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/ruby_event_store-newrelic - BUNDLE_GEMFILE: Gemfile + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false steps: diff --git a/.github/workflows/ruby_event_store-outbox.yml b/.github/workflows/ruby_event_store-outbox.yml index 7bcd01f6e9..df1609c6ae 100644 --- a/.github/workflows/ruby_event_store-outbox.yml +++ b/.github/workflows/ruby_event_store-outbox.yml @@ -20,8 +20,9 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/ruby_event_store-outbox - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} - DATABASE_URL: ${{ matrix.database_url }} + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" + DATABASE_URL: "${{ matrix.database_url }}" services: mysql_5: image: mysql:5 @@ -104,7 +105,9 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/ruby_event_store-outbox - BUNDLE_GEMFILE: Gemfile + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" + DATABASE_URL: "${{ matrix.database_url }}" strategy: fail-fast: false steps: diff --git a/.github/workflows/ruby_event_store-profiler.yml b/.github/workflows/ruby_event_store-profiler.yml index 8fb96e571a..7fe9f8f2c9 100644 --- a/.github/workflows/ruby_event_store-profiler.yml +++ b/.github/workflows/ruby_event_store-profiler.yml @@ -20,7 +20,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/ruby_event_store-profiler - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false matrix: @@ -49,7 +50,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/ruby_event_store-profiler - BUNDLE_GEMFILE: Gemfile + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false steps: diff --git a/.github/workflows/ruby_event_store-protobuf.yml b/.github/workflows/ruby_event_store-protobuf.yml index 2e9bd25521..bbc21eea3f 100644 --- a/.github/workflows/ruby_event_store-protobuf.yml +++ b/.github/workflows/ruby_event_store-protobuf.yml @@ -20,8 +20,9 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/ruby_event_store-protobuf - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} - DATABASE_URL: ${{ matrix.database_url }} + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" + DATABASE_URL: "${{ matrix.database_url }}" strategy: fail-fast: false matrix: @@ -63,7 +64,9 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/ruby_event_store-protobuf - BUNDLE_GEMFILE: Gemfile + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" + DATABASE_URL: "${{ matrix.database_url }}" strategy: fail-fast: false steps: diff --git a/.github/workflows/ruby_event_store-rom.yml b/.github/workflows/ruby_event_store-rom.yml index 1e64ee2863..9cd568955f 100644 --- a/.github/workflows/ruby_event_store-rom.yml +++ b/.github/workflows/ruby_event_store-rom.yml @@ -20,9 +20,10 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/ruby_event_store-rom - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} - DATABASE_URL: ${{ matrix.database_url }} - DATA_TYPE: ${{ matrix.data_type }} + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" + DATABASE_URL: "${{ matrix.database_url }}" + DATA_TYPE: "${{ matrix.data_type }}" services: postgres_11: image: postgres:11 @@ -112,7 +113,10 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/ruby_event_store-rom - BUNDLE_GEMFILE: Gemfile + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" + DATABASE_URL: "${{ matrix.database_url }}" + DATA_TYPE: "${{ matrix.data_type }}" strategy: fail-fast: false steps: diff --git a/.github/workflows/ruby_event_store-rspec.yml b/.github/workflows/ruby_event_store-rspec.yml index b85860eb16..29ac2484db 100644 --- a/.github/workflows/ruby_event_store-rspec.yml +++ b/.github/workflows/ruby_event_store-rspec.yml @@ -18,7 +18,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: ruby_event_store-rspec - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false matrix: @@ -49,7 +50,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: ruby_event_store-rspec - BUNDLE_GEMFILE: Gemfile + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false steps: diff --git a/.github/workflows/ruby_event_store-sequel.yml b/.github/workflows/ruby_event_store-sequel.yml index cfdff40d29..1bd4dc3efb 100644 --- a/.github/workflows/ruby_event_store-sequel.yml +++ b/.github/workflows/ruby_event_store-sequel.yml @@ -20,9 +20,10 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/ruby_event_store-sequel - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} - DATABASE_URL: ${{ matrix.database_url }} - DATA_TYPE: ${{ matrix.data_type }} + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" + DATABASE_URL: "${{ matrix.database_url }}" + DATA_TYPE: "${{ matrix.data_type }}" services: postgres_11: image: postgres:11 @@ -112,7 +113,10 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/ruby_event_store-sequel - BUNDLE_GEMFILE: Gemfile + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" + DATABASE_URL: "${{ matrix.database_url }}" + DATA_TYPE: "${{ matrix.data_type }}" strategy: fail-fast: false steps: diff --git a/.github/workflows/ruby_event_store-sidekiq_scheduler.yml b/.github/workflows/ruby_event_store-sidekiq_scheduler.yml index 7d75288441..79f61d320e 100644 --- a/.github/workflows/ruby_event_store-sidekiq_scheduler.yml +++ b/.github/workflows/ruby_event_store-sidekiq_scheduler.yml @@ -20,22 +20,28 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/ruby_event_store-sidekiq_scheduler - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} - REDIS_URL: redis://localhost:6379/0 + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" + REDIS_URL: "${{ matrix.redis_url }}" strategy: fail-fast: false matrix: include: - ruby_version: ruby-3.1 bundle_gemfile: Gemfile + redis_url: redis://localhost:6379/0 - ruby_version: ruby-3.0 bundle_gemfile: Gemfile + redis_url: redis://localhost:6379/0 - ruby_version: ruby-2.7 bundle_gemfile: Gemfile + redis_url: redis://localhost:6379/0 - ruby_version: ruby-3.1 bundle_gemfile: Gemfile.sidekiq_6_5 + redis_url: redis://localhost:6379/0 - ruby_version: ruby-3.1 bundle_gemfile: Gemfile.sidekiq_5_2 + redis_url: redis://localhost:6379/0 - ruby_version: ruby-3.0 bundle_gemfile: Gemfile.sidekiq_6_5 - ruby_version: ruby-3.0 @@ -71,8 +77,9 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/ruby_event_store-sidekiq_scheduler - BUNDLE_GEMFILE: Gemfile - REDIS_URL: redis://localhost:6379/0 + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" + REDIS_URL: "${{ matrix.redis_url }}" strategy: fail-fast: false steps: diff --git a/.github/workflows/ruby_event_store-transformations.yml b/.github/workflows/ruby_event_store-transformations.yml index 427428be1d..01472e6b03 100644 --- a/.github/workflows/ruby_event_store-transformations.yml +++ b/.github/workflows/ruby_event_store-transformations.yml @@ -20,7 +20,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/ruby_event_store-transformations - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false matrix: @@ -49,7 +50,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: contrib/ruby_event_store-transformations - BUNDLE_GEMFILE: Gemfile + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false steps: diff --git a/.github/workflows/ruby_event_store.yml b/.github/workflows/ruby_event_store.yml index 88eafd0cfd..aeac67993b 100644 --- a/.github/workflows/ruby_event_store.yml +++ b/.github/workflows/ruby_event_store.yml @@ -18,7 +18,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: ruby_event_store - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false matrix: @@ -49,7 +50,8 @@ jobs: runs-on: ubuntu-20.04 env: WORKING_DIRECTORY: ruby_event_store - BUNDLE_GEMFILE: Gemfile + RUBY_VERSION: "${{ matrix.ruby_version }}" + BUNDLE_GEMFILE: "${{ matrix.bundle_gemfile }}" strategy: fail-fast: false steps: diff --git a/support/ci/assets.yaml.erb b/support/ci/assets.yaml.erb index 83d5022792..d87badf22a 100644 --- a/support/ci/assets.yaml.erb +++ b/support/ci/assets.yaml.erb @@ -7,7 +7,7 @@ jobs: test: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> + <%= env %> strategy: fail-fast: false matrix: diff --git a/support/ci/contrib.yaml.erb b/support/ci/contrib.yaml.erb index 6cc5341c85..252e7044c0 100644 --- a/support/ci/contrib.yaml.erb +++ b/support/ci/contrib.yaml.erb @@ -19,8 +19,7 @@ jobs: test: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} + <%= env %> strategy: fail-fast: false matrix: @@ -41,8 +40,7 @@ jobs: mutate: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> - BUNDLE_GEMFILE: Gemfile + <%= env %> strategy: fail-fast: false steps: diff --git a/support/ci/db.yaml.erb b/support/ci/db.yaml.erb index 5f598951c9..5334ef0675 100644 --- a/support/ci/db.yaml.erb +++ b/support/ci/db.yaml.erb @@ -17,10 +17,7 @@ jobs: test: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} - DATABASE_URL: ${{ matrix.database_url }} - DATA_TYPE: ${{ matrix.data_type }} + <%= env %> services: postgres_11: image: postgres:11 @@ -74,8 +71,7 @@ jobs: mutate: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> - BUNDLE_GEMFILE: Gemfile + <%= env %> strategy: fail-fast: false steps: diff --git a/support/ci/dres_client.yaml.erb b/support/ci/dres_client.yaml.erb index 096835c438..8a852b7ade 100644 --- a/support/ci/dres_client.yaml.erb +++ b/support/ci/dres_client.yaml.erb @@ -23,8 +23,7 @@ jobs: test: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} + <%= env %> strategy: fail-fast: false matrix: diff --git a/support/ci/dres_rails.yaml.erb b/support/ci/dres_rails.yaml.erb index a3da2c519c..4bccf0a918 100644 --- a/support/ci/dres_rails.yaml.erb +++ b/support/ci/dres_rails.yaml.erb @@ -23,9 +23,7 @@ jobs: test: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} - DATABASE_URL: ${{ matrix.database_url }} + <%= env %> services: postgres_11: image: postgres:11 diff --git a/support/ci/elm.yaml.erb b/support/ci/elm.yaml.erb index 4657accdc4..c7f808ec29 100644 --- a/support/ci/elm.yaml.erb +++ b/support/ci/elm.yaml.erb @@ -17,8 +17,7 @@ jobs: test: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} + <%= env %> strategy: fail-fast: false matrix: @@ -48,8 +47,7 @@ jobs: mutate: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> - BUNDLE_GEMFILE: Gemfile + <%= env %> strategy: fail-fast: false steps: diff --git a/support/ci/generate b/support/ci/generate index f8fbb584bd..32b05aa5fb 100755 --- a/support/ci/generate +++ b/support/ci/generate @@ -103,7 +103,10 @@ class CI name: "ruby_event_store-browser", working_directory: "ruby_event_store-browser", matrix: - generate(ruby_version(RUBY_VERSIONS), bundle_gemfile(GEMFILE, "Gemfile.rack_2_0")), + generate( + ruby_version(RUBY_VERSIONS), + bundle_gemfile(GEMFILE, "Gemfile.rack_2_0") + ), template: "elm.yaml.erb" }, { @@ -114,7 +117,11 @@ class CI { name: "rails_event_store", working_directory: "rails_event_store", - matrix: generate(ruby_version(RUBY_VERSIONS), bundle_gemfile(GEMFILE, RAILS_GEMFILES)), + matrix: + generate( + ruby_version(RUBY_VERSIONS), + bundle_gemfile(GEMFILE, RAILS_GEMFILES) + ), template: "ruby.yaml.erb" }, { @@ -130,7 +137,10 @@ class CI ruby_version(RUBY_VERSIONS), bundle_gemfile(GEMFILE), join( - generate(database_url(SQLITE3), data_type(DATA_TYPES_IN_AR.take(1))), + generate( + database_url(SQLITE3), + data_type(DATA_TYPES_IN_AR.take(1)) + ), generate(database_url(POSTGRES), data_type(DATA_TYPES_IN_AR)), generate(database_url(MYSQL), data_type(DATA_TYPES_IN_AR.take(2))) ) @@ -145,7 +155,11 @@ class CI { name: "ruby_event_store-flipper", working_directory: "contrib/ruby_event_store-flipper", - matrix: generate(ruby_version(MRI_RUBY), bundle_gemfile(GEMFILE, AS_GEMFILES)), + matrix: + generate( + ruby_version(MRI_RUBY), + bundle_gemfile(GEMFILE, AS_GEMFILES) + ), template: "contrib.yaml.erb" }, { @@ -300,7 +314,8 @@ class CI join( generate( ruby_version(MRI_RUBY.drop(1)), - bundle_gemfile(GEMFILE, SIDEKIQ_GEMFILES) + bundle_gemfile(GEMFILE, SIDEKIQ_GEMFILES), + redis_url("redis://localhost:6379/0") ), generate(ruby_version(RUBY_3_0), bundle_gemfile(SIDEKIQ_GEMFILES)) ), @@ -325,13 +340,15 @@ class CI { name: "minitest-ruby_event_store", working_directory: "contrib/minitest-ruby_event_store", - matrix: generate(ruby_version(MRI_RUBY.drop(1)), bundle_gemfile(GEMFILE)), + matrix: + generate(ruby_version(MRI_RUBY.drop(1)), bundle_gemfile(GEMFILE)), template: "contrib.yaml.erb" }, { name: "minitest-ruby_event_store_coverage", working_directory: "contrib/minitest-ruby_event_store", - matrix: generate(ruby_version(MRI_RUBY.drop(1)), bundle_gemfile(GEMFILE)), + matrix: + generate(ruby_version(MRI_RUBY.drop(1)), bundle_gemfile(GEMFILE)), template: "coverage.yaml.erb" }, { @@ -342,7 +359,8 @@ class CI { name: "dres_client", working_directory: "contrib/dres_client", - matrix: generate(ruby_version(MRI_RUBY.drop(1)), bundle_gemfile(GEMFILE)), + matrix: + generate(ruby_version(MRI_RUBY.drop(1)), bundle_gemfile(GEMFILE)), template: "dres_client.yaml.erb" }, { @@ -392,6 +410,10 @@ class CI axis("database_url", *database_url) end + def redis_url(*redis_url) + axis("redis_url", *redis_url) + end + def data_type(*data_type) axis("data_type", *data_type) end @@ -409,6 +431,13 @@ class CI name: name, working_directory: gem.fetch(:working_directory), matrix: as_formatted_yaml(gem[:matrix], indent: 10), + env: + as_formatted_yaml( + { "WORKING_DIRECTORY" => gem.fetch(:working_directory) }.merge( + matrix_env_vars(gem[:matrix]) + ), + indent: 6 + ) ) ) @@ -416,6 +445,15 @@ class CI end end + def matrix_env_vars(matrix) + return {} unless matrix + + matrix + .first + .keys + .reduce({}) { |acc, key| acc.merge(key.upcase => "${{ matrix.#{key} }}") } + end + def as_formatted_yaml(content, indent:) Psych.dump(content).lines.drop(1).join(" " * indent).strip end diff --git a/support/ci/outbox.yaml.erb b/support/ci/outbox.yaml.erb index ff439c1e6e..83b96b283e 100644 --- a/support/ci/outbox.yaml.erb +++ b/support/ci/outbox.yaml.erb @@ -19,9 +19,7 @@ jobs: test: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} - DATABASE_URL: ${{ matrix.database_url }} + <%= env %> services: mysql_5: image: mysql:5 @@ -74,8 +72,7 @@ jobs: mutate: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> - BUNDLE_GEMFILE: Gemfile + <%= env %> strategy: fail-fast: false steps: diff --git a/support/ci/protobuf.yaml.erb b/support/ci/protobuf.yaml.erb index d9cd1bff2d..252e7044c0 100644 --- a/support/ci/protobuf.yaml.erb +++ b/support/ci/protobuf.yaml.erb @@ -19,9 +19,7 @@ jobs: test: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} - DATABASE_URL: ${{ matrix.database_url }} + <%= env %> strategy: fail-fast: false matrix: @@ -42,8 +40,7 @@ jobs: mutate: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> - BUNDLE_GEMFILE: Gemfile + <%= env %> strategy: fail-fast: false steps: diff --git a/support/ci/rom.yaml.erb b/support/ci/rom.yaml.erb index 45075bf96c..3f06c3eaab 100644 --- a/support/ci/rom.yaml.erb +++ b/support/ci/rom.yaml.erb @@ -19,10 +19,7 @@ jobs: test: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} - DATABASE_URL: ${{ matrix.database_url }} - DATA_TYPE: ${{ matrix.data_type }} + <%= env %> services: postgres_11: image: postgres:11 @@ -76,8 +73,7 @@ jobs: mutate: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> - BUNDLE_GEMFILE: Gemfile + <%= env %> strategy: fail-fast: false steps: diff --git a/support/ci/ruby.yaml.erb b/support/ci/ruby.yaml.erb index 75c8be5bcb..d7ec645d71 100644 --- a/support/ci/ruby.yaml.erb +++ b/support/ci/ruby.yaml.erb @@ -17,8 +17,7 @@ jobs: test: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} + <%= env %> strategy: fail-fast: false matrix: @@ -39,8 +38,7 @@ jobs: mutate: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> - BUNDLE_GEMFILE: Gemfile + <%= env %> strategy: fail-fast: false steps: diff --git a/support/ci/scheduler.yaml.erb b/support/ci/scheduler.yaml.erb index 3d7faa34b3..4f4c60ee62 100644 --- a/support/ci/scheduler.yaml.erb +++ b/support/ci/scheduler.yaml.erb @@ -19,9 +19,7 @@ jobs: test: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> - BUNDLE_GEMFILE: ${{ matrix.bundle_gemfile }} - REDIS_URL: redis://localhost:6379/0 + <%= env %> strategy: fail-fast: false matrix: @@ -57,9 +55,7 @@ jobs: mutate: runs-on: ubuntu-20.04 env: - WORKING_DIRECTORY: <%= working_directory %> - BUNDLE_GEMFILE: Gemfile - REDIS_URL: redis://localhost:6379/0 + <%= env %> strategy: fail-fast: false steps: