Sweep: Set up GitHub Actions CI pipeline #1
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
name: Continuous Integration | |
on: | |
push: | |
branches: [ '*' ] | |
pull_request: | |
branches: [ '*' ] | |
jobs: | |
backend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: .ruby-version | |
- name: Install dependencies | |
run: bundle install | |
- name: Set up test database | |
run: | | |
cp config/database.yml.travis config/database.yml | |
bundle exec rake db:create db:schema:load | |
- name: Run tests | |
run: bundle exec rake test | |
frontend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '12.x' | |
- name: Install dependencies | |
run: yarn install | |
- name: Run tests | |
run: yarn test |