File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4242 - run : ruby hello.rb
4343` ` `
4444
45+ Ruby on Rails Testing:
46+ ` ` ` yaml
47+ name : Rails Unit Tests
48+
49+ on : [push, pull_request]
50+
51+ jobs :
52+ build :
53+
54+ runs-on : ubuntu-latest
55+
56+ services :
57+ db :
58+ image : postgres:11
59+ ports : ['5432:5432']
60+ options : >-
61+ --health-cmd pg_isready
62+ --health-interval 10s
63+ --health-timeout 5s
64+ --health-retries 5
65+
66+ steps :
67+ - uses : actions/checkout@v1
68+ - name : Set up Ruby 2.6
69+ uses : actions/setup-ruby@v1
70+ with :
71+ ruby-version : 2.6.x
72+ - name : Build and test with Rake
73+ env :
74+ PGHOST : 127.0.0.1
75+ PGUSER : postgres
76+ RAILS_ENV : test
77+ run : |
78+ sudo apt-get -yqq install libpq-dev
79+ gem install bundler
80+ bundle install --jobs 4 --retry 3
81+ bundle exec rails db:create
82+ bundle exec rails db:migrate
83+ bundle exec rails test
84+ ` ` `
85+
4586# License
4687
4788The scripts and documentation in this project are released under the [MIT License](LICENSE)
You can’t perform that action at this time.
0 commit comments