Skip to content

Add command to generate a configuration file #594

Add command to generate a configuration file

Add command to generate a configuration file #594

Workflow file for this run

name: CI
on:
pull_request:
branches:
- '*'
push:
branches:
- '*'
schedule:
- cron: '0 0 * * *'
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['2.7', '3.0', '3.1', '3.2']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run Unit tests
run: bundle exec rake spec:unit
- name: Run Standard linter
run: bundle exec standardrb
integration:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# adapter: [ 'mysql2', 'pg', 'sqlite3' ]
ruby: [ '2.7', '3.0', '3.1', '3.2' ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Start MySQL
run: sudo systemctl start mysql.service
- name: Start and setup Postgres
run: |
sudo systemctl start postgresql.service
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'root'"
# https://github.com/actions/runner-images/issues/7678
- name: Install dummyapp dependencies (sqlite)
run: bundle install
working-directory: spec/dummyapp
env:
DATABASE_ADAPTER: sqlite3
- name: Run dummyapp migrations (sqlite)
run: bin/rails db:create && bin/rails db:migrate
working-directory: spec/dummyapp
env:
DATABASE_ADAPTER: sqlite3
- name: Run Integration tests (sqlite)
run: bundle exec rake spec:integration
env:
DATABASE_ADAPTER: sqlite3
- name: Clean dummyapp (sqlite)
run: |
rm -f Gemfile.lock
rm -f db/schema.rb
working-directory: spec/dummyapp
- name: Install dummyapp dependencies (mysql2)
run: bundle install
working-directory: spec/dummyapp
env:
DATABASE_ADAPTER: mysql2
- name: Run dummyapp migrations (mysql2)
run: bin/rails db:create && bin/rails db:migrate
working-directory: spec/dummyapp
env:
DATABASE_ADAPTER: mysql2
- name: Run Integration tests (mysql2)
run: bundle exec rake spec:integration
env:
DATABASE_ADAPTER: mysql2
- name: Clean dummyapp (mysql2)
run: |
rm -f Gemfile.lock
rm -f db/schema.rb
working-directory: spec/dummyapp
- name: Install dummyapp dependencies (pg)
run: bundle install
working-directory: spec/dummyapp
env:
DATABASE_ADAPTER: pg
- name: Run dummyapp migrations (pg)
run: bin/rails db:create && bin/rails db:migrate
working-directory: spec/dummyapp
env:
DATABASE_ADAPTER: pg
- name: Run Integration tests (pg)
run: bundle exec rake spec:integration
env:
DATABASE_ADAPTER: pg
- name: Clean dummyapp (pg)
run: |
rm -f Gemfile.lock
rm -f db/schema.rb
working-directory: spec/dummyapp