Skip to content

Commit

Permalink
Add Github actions for individual modules and examples (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
guilleiguaran authored May 25, 2023
1 parent d799f3d commit 6939441
Show file tree
Hide file tree
Showing 16 changed files with 417 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/examples-core_minitest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Examples: Core module with Redis (Minitest)"

on:
push:
branches:
- main

pull_request:

jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.2.0'

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run the example
working-directory: ./examples
run: ruby redis_backed_cache_minitest.rb
28 changes: 28 additions & 0 deletions .github/workflows/examples-core_rspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Examples: Core module with Redis (RSpec)"

on:
push:
branches:
- main

pull_request:

jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.2.0'

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run the example
working-directory: ./examples
run: ruby redis_backed_cache_rspec.rb
28 changes: 28 additions & 0 deletions .github/workflows/examples-memcached.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Examples: Core module with Memcached (RSpec)"

on:
push:
branches:
- main

pull_request:

jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.2.0'

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run the example
working-directory: ./examples
run: ruby memcached_rspec.rb
28 changes: 28 additions & 0 deletions .github/workflows/examples-mysql_rspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Examples: MySQL module (ActiveRecord + RSpec)"

on:
push:
branches:
- main

pull_request:

jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.2.0'

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run the example
working-directory: ./examples
run: ruby mysql_ar_rspec.rb
28 changes: 28 additions & 0 deletions .github/workflows/examples-redis_rspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Examples: Redis module (RSpec)"

on:
push:
branches:
- main

pull_request:

jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.2.0'

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run the example
working-directory: ./examples
run: ruby redis_container_rspec.rb
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ruby
name: "Ruby CI: Style Checks with Standard"

on:
push:
Expand All @@ -23,5 +23,5 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run the default task
run: bundle exec rake
- name: Run standard code style checks
run: bundle exec rake standard
34 changes: 34 additions & 0 deletions .github/workflows/module-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Modules: Core tests"

on:
push:
branches:
- main

pull_request:

jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.2.0'

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install development dependencies
working-directory: ./core
run: bundle install
- name: Run the tests
working-directory: ./core
run: bundle exec rake test
- name: Run standard code style checks
working-directory: ./core
run: bundle exec rake standard
34 changes: 34 additions & 0 deletions .github/workflows/module-elasticsearch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Modules: ElasticSearch tests"

on:
push:
branches:
- main

pull_request:

jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.2.0'

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install development dependencies
working-directory: ./elasticsearch
run: bundle install
- name: Run the tests
working-directory: ./elasticsearch
run: bundle exec rake test
- name: Run standard code style checks
working-directory: ./elasticsearch
run: bundle exec rake standard
34 changes: 34 additions & 0 deletions .github/workflows/module-mariadb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Modules: MariaDB tests"

on:
push:
branches:
- main

pull_request:

jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.2.0'

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install development dependencies
working-directory: ./mariadb
run: bundle install
- name: Run the tests
working-directory: ./mariadb
run: bundle exec rake test
- name: Run standard code style checks
working-directory: ./mariadb
run: bundle exec rake standard
34 changes: 34 additions & 0 deletions .github/workflows/module-mongo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Modules: MongoDB tests"

on:
push:
branches:
- main

pull_request:

jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.2.0'

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install development dependencies
working-directory: ./mongo
run: bundle install
- name: Run the tests
working-directory: ./mongo
run: bundle exec rake test
- name: Run standard code style checks
working-directory: ./mongo
run: bundle exec rake standard
34 changes: 34 additions & 0 deletions .github/workflows/module-mysql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Modules: MySQL tests"

on:
push:
branches:
- main

pull_request:

jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.2.0'

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install development dependencies
working-directory: ./mysql
run: bundle install
- name: Run the tests
working-directory: ./mysql
run: bundle exec rake test
- name: Run standard code style checks
working-directory: ./mysql
run: bundle exec rake standard
34 changes: 34 additions & 0 deletions .github/workflows/module-nginx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Modules: Nginx tests"

on:
push:
branches:
- main

pull_request:

jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.2.0'

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install development dependencies
working-directory: ./nginx
run: bundle install
- name: Run the tests
working-directory: ./nginx
run: bundle exec rake test
- name: Run standard code style checks
working-directory: ./nginx
run: bundle exec rake standard
Loading

0 comments on commit 6939441

Please sign in to comment.