Error handling for element #70
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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/* |