-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OD-617 Run tests on Github Actions (#78)
* OD-617 Run tests on Github Actions * OD-617 Update Rails because of Mimemagic yank * OD-617 Update Rails because of Mimemagic yank * OD-617 Fix story spec * OD-617 Specify new Ruby version in Ansible and Readme * Fix Puma dependency * Fix broken test
- Loading branch information
1 parent
bc0286e
commit 1bfbbfa
Showing
15 changed files
with
158 additions
and
91 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,71 @@ | ||
name: Automated Tests | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
automated-tests: | ||
name: ${{ matrix.tests.command }} | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
CI: true | ||
RAILS_ENV: test | ||
SPEC_OPTS: --force-color | ||
|
||
services: | ||
database: | ||
image: mariadb:10.5.4-focal | ||
env: | ||
MYSQL_ROOT_PASSWORD: password | ||
MYSQL_DATABASE: opendoorstempsite | ||
ports: | ||
- 3306:3306 | ||
|
||
redis: | ||
image: redis:3.2.1 | ||
ports: | ||
- 6379:6379 | ||
|
||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run apt-get update | ||
run: sudo apt-get update | ||
|
||
- name: Install dependencies for Node and MariaDB | ||
run: sudo apt-get install -y libnode-dev libmariadbclient-dev | ||
|
||
# - name: Install LibXML | ||
# run: sudo apt-get install libxml2-dev | ||
|
||
- name: Set up Ruby and run bundle install | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
|
||
- name: Copy config files | ||
run: | | ||
cp config/github-actions/cable.yml config/cable.yml | ||
cp config/github-actions/database.yml config/database.yml | ||
cp config/github-actions/secrets.yml config/secrets.yml | ||
- name: Make database | ||
run: bundle exec rake db:create db:schema:load db:migrate | ||
|
||
- name: Install NPM modules | ||
run: npm install | ||
|
||
- name: Compile front-end application | ||
run: bundle exec rake webpacker:compile | ||
|
||
- name: Run tests | ||
run: bundle exec rspec spec --format doc | ||
|
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 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 |
---|---|---|
@@ -1 +1 @@ | ||
2.3.7 | ||
2.7.3 |
This file was deleted.
Oops, something went wrong.
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 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 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 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,7 @@ | ||
local: &local | ||
adapter: redis | ||
url: redis://localhost:6379 | ||
|
||
production: *local | ||
development: *local | ||
test: *local |
10 changes: 5 additions & 5 deletions
10
config/database.travis.yml → config/github-actions/database.yml
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
default: &default | ||
test: | ||
host: 127.0.0.1 | ||
port: 3306 | ||
adapter: mysql2 | ||
database: opendoorstempsite_test | ||
username: root | ||
encoding: utf8 | ||
password: password | ||
encoding: utf8mb4 | ||
variables: | ||
sql_mode: STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | ||
|
||
test: | ||
<<: *default | ||
database: opendoorstempsite_test |
File renamed without changes.
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
Oops, something went wrong.