-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
123d94d
commit 995000e
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
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
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 |