11---
22name : Tests
3- ' on ' :
3+
4+ on :
45 push :
56 branches :
67 - master
78 pull_request :
89 branches :
910 - master
11+
1012jobs :
1113 test_mysql :
1214 runs-on : ubuntu-24.04
15+
1316 services :
1417 mysql :
1518 image : mysql:5.7
2225 --health-interval=10s
2326 --health-timeout=5s
2427 --health-retries=3
28+
2529 strategy :
2630 fail-fast : false
2731 matrix :
@@ -30,34 +34,40 @@ jobs:
3034 gemfile : Gemfile.5.0
3135 - ruby : 2.5.3
3236 gemfile : Gemfile.5.1
37+
3338 env :
34- BUNDLE_GEMFILE : " ${{ matrix.gemfile }}"
39+ BUNDLE_GEMFILE : ${{ matrix.gemfile }}
40+
3541 steps :
36- - uses : actions/checkout@v2
42+ - uses : actions/checkout@v3
3743 - name : Install ruby
3844 uses : ruby/setup-ruby@v1
3945 with :
40- ruby-version : " ${{ matrix.ruby }}"
41- - name : Bundle
42- run : |
43- gem install bundler:2.1.4
44- bundle install --no-deployment
46+ ruby-version : ${{ matrix.ruby }}
47+ bundler-cache : true
4548 - name : Setup databases
4649 run : |
4750 mysql -e 'create database IF NOT EXISTS assignable_values_test;' -u root --password=password -P 3306 -h 127.0.0.1
4851 - name : Run tests
4952 run : bundle exec rspec
53+
5054 test_pg :
5155 runs-on : ubuntu-24.04
56+
5257 services :
5358 postgres :
5459 image : postgres
5560 env :
5661 POSTGRES_PASSWORD : postgres
57- options : " --health-cmd pg_isready --health-interval 10s --health-timeout 5s
58- --health-retries 5"
62+ POSTGRES_DB : assignable_values_test
63+ options : >-
64+ --health-cmd pg_isready
65+ --health-interval 10s
66+ --health-timeout 5s
67+ --health-retries 5
5968 ports :
6069 - 5432:5432
70+
6171 strategy :
6272 fail-fast : false
6373 matrix :
@@ -78,21 +88,14 @@ jobs:
7888 gemfile : Gemfile.8.0.pg
7989
8090 env :
81- BUNDLE_GEMFILE : " ${{ matrix.gemfile }}"
91+ BUNDLE_GEMFILE : ${{ matrix.gemfile }}
92+
8293 steps :
83- - uses : actions/checkout@v2
94+ - uses : actions/checkout@v3
8495 - name : Install ruby
8596 uses : ruby/setup-ruby@v1
8697 with :
87- ruby-version : " ${{ matrix.ruby }}"
88- - name : Setup database
89- run : |
90- sudo apt-get update
91- sudo apt-get install -y postgresql-client
92- PGPASSWORD=postgres psql -c 'create database assignable_values_test;' -U postgres -p 5432 -h localhost
93- - name : Bundle
94- run : |
95- gem install bundler:2.1.4
96- bundle install --no-deployment
98+ ruby-version : ${{ matrix.ruby }}
99+ bundler-cache : true
97100 - name : Run tests
98101 run : bundle exec rspec
0 commit comments