Skip to content

Commit

Permalink
Configure CI
Browse files Browse the repository at this point in the history
  • Loading branch information
josefarias committed Feb 3, 2024
1 parent 123d94d commit 995000e
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI Tests

on:
push:
branches:
- main
- jose/ci

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.0

- name: Install dependencies
run: |
sudo apt-get update -yqq
sudo apt-get install -yqq libsqlite3-dev
gem install bundler
bundle install --jobs 4 --retry 3
- name: Setup database
run: |
bundle exec rake db:create
bundle exec rake db:schema:load
- name: Load fixtures
run: bundle exec rake db:fixtures:load

- name: Setup Chrome and Chromedriver
run: |
sudo apt-get update
sudo apt-get install -yqq google-chrome-stable
CHROMEDRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
wget -N http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip -P ~/
unzip ~/chromedriver_linux64.zip -d ~/
sudo mv -f ~/chromedriver /usr/local/bin/chromedriver
sudo chown root:root /usr/local/bin/chromedriver
sudo chmod 0755 /usr/local/bin/chromedriver
- name: Run tests
run: bundle exec rake app:test

- name: Run system tests
env:
RAILS_ENV: test
DATABASE_URL: sqlite3:db/test.sqlite3
HEADLESS_CHROME: true
run: bundle exec rake app:test:system

0 comments on commit 995000e

Please sign in to comment.