-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (40 loc) · 1.25 KB
/
rubyonrails.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# This workflow uses actions that are not certified by GitHub. They are
# provided by a third-party and are governed by separate terms of service,
# privacy policy, and support documentation.
#
# This workflow will install a prebuilt Ruby version, install dependencies, and
# run tests and linters.
name: "Ruby on Rails CI"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
env:
RAILS_ENV: test
steps:
- name: Install python ase dep
run: python3 -m pip install ase pymatgen
- name: Turn on mysql
run: sudo /etc/init.d/mysql start
- name: Create DB
run: mysql -uroot -proot -e "CREATE DATABASE mofdb2_test;"
- name: Checkout code
uses: actions/checkout@v3
- name: Install Ruby and gems
uses: ruby/setup-ruby@8f312efe1262fb463d906e9bf040319394c18d3e # v1.92
with:
bundler-cache: true
- name: Create .env file
run: mv .env.example .env
- name: Set up database schema
run: bin/rails db:schema:load
- name: Seed database
run: bin/rails db:seed
- name: Pregen json / db
run: bin/rake pregen:all
- name: Run tests
run: bundle exec rspec spec/suites/*