Skip to content

Commit eaf4013

Browse files
authored
Merge pull request #1107 from jruby/gha
Move CI testing to GHA
2 parents db8f660 + 9241c95 commit eaf4013

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/ruby.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7+
8+
name: Ruby
9+
10+
on:
11+
push:
12+
branches: [ master ]
13+
pull_request:
14+
branches: [ master ]
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
test:
21+
22+
runs-on: ubuntu-latest
23+
strategy:
24+
matrix:
25+
ruby-version: ['jruby-9.3.4.0']
26+
27+
steps:
28+
- uses: actions/checkout@v3
29+
- name: Set up Ruby
30+
uses: ruby/setup-ruby@v1
31+
with:
32+
ruby-version: ${{ matrix.ruby-version }}
33+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
34+
- name: Run tests
35+
run:
36+
- echo "JAVA_OPTS=$JAVA_OPTS"
37+
- export JRUBY_OPTS="-J-Xms64M -J-Xmx1024M"
38+
- rake jar # compiles ext generates: lib/arjdbc/jdbc/adapter_java.jar
39+
- mysql --version || true # to see if we're using MySQL or MariaDB
40+
- rake db:mysql
41+
- "mysql -e "CREATE USER rails@localhost;"
42+
- mysql -e "grant all privileges on activerecord_unittest.* to rails@localhost;"
43+
- mysql -e "grant all privileges on activerecord_unittest2.* to rails@localhost;"
44+
- mysql -e "grant all privileges on inexistent_activerecord_unittest.* to rails@localhost;"
45+
- mysql -e "CREATE DATABASE activerecord_unittest DEFAULT CHARACTER SET utf8mb4;"
46+
- mysql -e "CREATE DATABASE activerecord_unittest2 DEFAULT CHARACTER SET utf8mb4;"

0 commit comments

Comments
 (0)