Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 17 additions & 9 deletions .github/workflows/acceptance-tests-on-emulator.yaml
Original file line number Diff line number Diff line change
@@ -1,45 +1,53 @@
name: acceptance tests on emulator

permissions:
contents: read

on:
push:
branches:
- main
pull_request:
name: acceptance tests on emulator
jobs:
test:
runs-on: ubuntu-latest

services:
emulator:
image: gcr.io/cloud-spanner-emulator/emulator:latest
image: gcr.io/cloud-spanner-emulator/emulator:1.5.50

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: The latest version is 1.5.55. Can we pin to that version?

ports:
- 9010:9010
- 9020:9020

strategy:
max-parallel: 4
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4"]
ruby: ["3.2", "3.3", "3.4", "4.0"]
ar: ["~> 7.0.0", "~> 7.1.0", "~> 7.2.0", "~> 8.0.0", "~> 8.1.0"]
# Exclude combinations that are not supported.
exclude:
- ruby: "3.1"
ar: "~> 8.0.0"
- ruby: "3.1"
ar: "~> 8.1.0"
- ruby: "3.4"
ar: "~> 7.0.0"
- ruby: "3.4"
ar: "~> 7.1.0"
- ruby: "3.4"
ar: "~> 7.2.0"
- ruby: "4.0"
ar: "~> 7.0.0"
- ruby: "4.0"
ar: "~> 7.1.0"
- ruby: "4.0"
ar: "~> 7.2.0"
env:
AR_VERSION: ${{ matrix.ar }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby
# (see https://github.com/ruby/setup-ruby#versioning):
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
with:
bundler-cache: false
ruby-version: ${{ matrix.ruby }}
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/acceptance-tests-on-production.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: acceptance tests on production

permissions:
contents: read

on:
push:
branches:
- main
pull_request:
name: acceptance tests on production
jobs:
check-env:
outputs:
Expand All @@ -26,20 +30,22 @@ jobs:
matrix:
ruby: [3.3]
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby
# (see https://github.com/ruby/setup-ruby#versioning):
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
with:
bundler-cache: true
ruby-version: ${{ matrix.ruby }}
- name: Authenticate Google Cloud
uses: google-github-actions/auth@v3
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Setup GCloud
uses: google-github-actions/setup-gcloud@v3
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
- name: Install dependencies
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,45 @@
name: ci

permissions:
contents: read

on:
push:
branches:
- main
pull_request:
name: ci
jobs:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4"]
ruby: ["3.2", "3.3", "3.4", "4.0"]
ar: ["~> 7.0.0", "~> 7.1.0", "~> 7.2.0", "~> 8.0.0", "~> 8.1.0"]
# Exclude combinations that are not supported.
exclude:
- ruby: "3.1"
ar: "~> 8.0.0"
- ruby: "3.1"
ar: "~> 8.1.0"
- ruby: "3.4"
ar: "~> 7.0.0"
- ruby: "3.4"
ar: "~> 7.1.0"
- ruby: "3.4"
ar: "~> 7.2.0"
- ruby: "4.0"
ar: "~> 7.0.0"
- ruby: "4.0"
ar: "~> 7.1.0"
- ruby: "4.0"
ar: "~> 7.2.0"
env:
AR_VERSION: ${{ matrix.ar }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby
# (see https://github.com/ruby/setup-ruby#versioning):
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
with:
bundler-cache: false
ruby-version: ${{ matrix.ruby }}
Expand Down
26 changes: 17 additions & 9 deletions .github/workflows/nightly-acceptance-tests-on-emulator.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,51 @@
name: nightly acceptance tests on emulator

permissions:
contents: read

on:
schedule:
# 06:00 UTC
- cron: '0 6 * * *'
workflow_dispatch:
name: nightly acceptance tests on emulator
jobs:
test:
runs-on: ubuntu-latest

services:
emulator:
image: gcr.io/cloud-spanner-emulator/emulator:latest
image: gcr.io/cloud-spanner-emulator/emulator:1.5.50
ports:
- 9010:9010
- 9020:9020

strategy:
max-parallel: 4
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4"]
ruby: ["3.2", "3.3", "3.4", "4.0"]
ar: ["~> 7.0.0", "~> 7.1.0", "~> 7.2.0", "~> 8.0.0", "~> 8.1.0"]
# Exclude combinations that are not supported.
exclude:
- ruby: "3.1"
ar: "~> 8.0.0"
- ruby: "3.1"
ar: "~> 8.1.0"
- ruby: "3.4"
ar: "~> 7.0.0"
- ruby: "3.4"
ar: "~> 7.1.0"
- ruby: "3.4"
ar: "~> 7.2.0"
- ruby: "4.0"
ar: "~> 7.0.0"
- ruby: "4.0"
ar: "~> 7.1.0"
- ruby: "4.0"
ar: "~> 7.2.0"
env:
AR_VERSION: ${{ matrix.ar }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Set up Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
with:
# Disable caching as we are overriding the ActiveRecord below.
bundler-cache: false
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/nightly-acceptance-tests-on-production.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: nightly acceptance tests on production

permissions:
contents: read

on:
schedule:
# 02:00 UTC
- cron: '0 2 * * *'
name: nightly acceptance tests on production
jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -12,20 +16,22 @@ jobs:
matrix:
ruby: [3.3]
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby
# (see https://github.com/ruby/setup-ruby#versioning):
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
with:
bundler-cache: true
ruby-version: ${{ matrix.ruby }}
- name: Authenticate Google Cloud
uses: google-github-actions/auth@v3
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Setup GCloud
uses: google-github-actions/setup-gcloud@v3
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
- name: Install dependencies
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/nightly-unit-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,44 @@
name: nightly-unit-tests

permissions:
contents: read

on:
schedule:
# 05:30 UTC
- cron: '30 5 * * *'
workflow_dispatch:
name: nightly-unit-tests
jobs:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
# Run acceptance tests all supported combinations of Ruby and ActiveRecord.
ruby: ["3.1", "3.2", "3.3", "3.4"]
ruby: ["3.2", "3.3", "3.4", "4.0"]
ar: ["~> 7.0.0", "~> 7.1.0", "~> 7.2.0", "~> 8.0.0", "~> 8.1.0"]
# Exclude combinations that are not supported.
exclude:
- ruby: "3.1"
ar: "~> 8.0.0"
- ruby: "3.1"
ar: "~> 8.1.0"
- ruby: "3.4"
ar: "~> 7.0.0"
- ruby: "3.4"
ar: "~> 7.1.0"
- ruby: "3.4"
ar: "~> 7.2.0"
- ruby: "4.0"
ar: "~> 7.0.0"
- ruby: "4.0"
ar: "~> 7.1.0"
- ruby: "4.0"
ar: "~> 7.2.0"
env:
AR_VERSION: ${{ matrix.ar }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Set up Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
with:
# Disable caching as we are overriding the ActiveRecord below.
bundler-cache: false
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/rubocop.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: rubocop

permissions:
contents: read

on:
pull_request:
types: [opened, synchronize]
Expand All @@ -12,13 +15,15 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: setup ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
with:
ruby-version: '3.4.8'
ruby-version: '4.0'
- name: cache gems
uses: actions/cache@v5
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
with:
path: vendor/bundle
key: ${{ runner.os }}-rubocop-${{ hashFiles('**/Gemfile.lock') }}
Expand Down
22 changes: 16 additions & 6 deletions .github/workflows/samples.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,41 @@
name: samples

permissions:
contents: read

on:
pull_request:
name: samples
jobs:
test:
runs-on: ubuntu-latest

strategy:
max-parallel: 4
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4"]
ruby: ["3.2", "3.3", "3.4", "4.0"]
ar: ["~> 7.0.0", "~> 7.1.0", "~> 7.2.0", "~> 8.0.0"]
# Exclude combinations that are not supported.
exclude:
- ruby: "3.1"
ar: "~> 8.0.0"
- ruby: "3.4"
ar: "~> 7.0.0"
- ruby: "3.4"
ar: "~> 7.1.0"
- ruby: "3.4"
ar: "~> 7.2.0"
- ruby: "4.0"
ar: "~> 7.0.0"
- ruby: "4.0"
ar: "~> 7.1.0"
- ruby: "4.0"
ar: "~> 7.2.0"
env:
AR_VERSION: ${{ matrix.ar }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Set up Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
with:
bundler-cache: false
ruby-version: ${{ matrix.ruby }}
Expand Down
Loading
Loading