diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 000000000..5e552ef02 --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,15 @@ +name: Linting +on: + - pull_request +jobs: + yamllint: + name: Yamllint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Yamllint + uses: karancode/yamllint-github-action@master + with: + yamllint_comment: true + env: + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 890a1a796..deac45dc9 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -12,26 +12,26 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: Set up Ruby 3.1 - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.1 - - name: Install required package - run: | - sudo apt-get install alien - - name: Download Oracle instant client - run: | - wget -q https://download.oracle.com/otn_software/linux/instantclient/211000/oracle-instantclient-basic-21.1.0.0.0-1.x86_64.rpm - wget -q https://download.oracle.com/otn_software/linux/instantclient/211000/oracle-instantclient-sqlplus-21.1.0.0.0-1.x86_64.rpm - wget -q https://download.oracle.com/otn_software/linux/instantclient/211000/oracle-instantclient-devel-21.1.0.0.0-1.x86_64.rpm - - name: Install Oracle instant client - run: | - sudo alien -i oracle-instantclient-basic-21.1.0.0.0-1.x86_64.rpm - sudo alien -i oracle-instantclient-sqlplus-21.1.0.0.0-1.x86_64.rpm - sudo alien -i oracle-instantclient-devel-21.1.0.0.0-1.x86_64.rpm + - uses: actions/checkout@v1 + - name: Set up Ruby 3.1 + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.1 + - name: Install required package + run: | + sudo apt-get install alien + - name: Download Oracle instant client + run: | + wget -q https://download.oracle.com/otn_software/linux/instantclient/211000/oracle-instantclient-basic-21.1.0.0.0-1.x86_64.rpm + wget -q https://download.oracle.com/otn_software/linux/instantclient/211000/oracle-instantclient-sqlplus-21.1.0.0.0-1.x86_64.rpm + wget -q https://download.oracle.com/otn_software/linux/instantclient/211000/oracle-instantclient-devel-21.1.0.0.0-1.x86_64.rpm + - name: Install Oracle instant client + run: | + sudo alien -i oracle-instantclient-basic-21.1.0.0.0-1.x86_64.rpm + sudo alien -i oracle-instantclient-sqlplus-21.1.0.0.0-1.x86_64.rpm + sudo alien -i oracle-instantclient-devel-21.1.0.0.0-1.x86_64.rpm - - name: Build and run RuboCop - run: | - bundle install --jobs 4 --retry 3 - bundle exec rubocop + - name: Build and run RuboCop + run: | + bundle install --jobs 4 --retry 3 + bundle exec rubocop diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4e3401508..68c407f66 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,41 +48,41 @@ jobs: --health-timeout 5s --health-retries 10 steps: - - uses: actions/checkout@v2 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - - name: Install required package - run: | - sudo apt-get install alien - - name: Download Oracle client - run: | - wget -q https://download.oracle.com/otn_software/linux/instantclient/214000/oracle-instantclient-basic-21.4.0.0.0-1.x86_64.rpm - wget -q https://download.oracle.com/otn_software/linux/instantclient/214000/oracle-instantclient-sqlplus-21.4.0.0.0-1.x86_64.rpm - wget -q https://download.oracle.com/otn_software/linux/instantclient/214000/oracle-instantclient-devel-21.4.0.0.0-1.x86_64.rpm - - name: Install Oracle client - run: | - sudo alien -i oracle-instantclient-basic-21.4.0.0.0-1.x86_64.rpm - sudo alien -i oracle-instantclient-sqlplus-21.4.0.0.0-1.x86_64.rpm - sudo alien -i oracle-instantclient-devel-21.4.0.0.0-1.x86_64.rpm - - name: Install JDBC Driver - run: | - wget -q https://download.oracle.com/otn-pub/otn_software/jdbc/211/ojdbc11.jar -O ./lib/ojdbc11.jar - - name: Create database user - run: | - ./ci/setup_accounts.sh - - name: Bundle install - run: | - bundle install --jobs 4 --retry 3 - - name: Run RSpec - run: | - bundle exec rspec - - name: Workaround jruby-head failure by removing Gemfile.lock - run: | - rm Gemfile.lock - - name: Run bug report templates - run: | - cd guides/bug_report_templates - ruby active_record_gem.rb - ruby active_record_gem_spec.rb + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + - name: Install required package + run: | + sudo apt-get install alien + - name: Download Oracle client + run: | + wget -q https://download.oracle.com/otn_software/linux/instantclient/214000/oracle-instantclient-basic-21.4.0.0.0-1.x86_64.rpm + wget -q https://download.oracle.com/otn_software/linux/instantclient/214000/oracle-instantclient-sqlplus-21.4.0.0.0-1.x86_64.rpm + wget -q https://download.oracle.com/otn_software/linux/instantclient/214000/oracle-instantclient-devel-21.4.0.0.0-1.x86_64.rpm + - name: Install Oracle client + run: | + sudo alien -i oracle-instantclient-basic-21.4.0.0.0-1.x86_64.rpm + sudo alien -i oracle-instantclient-sqlplus-21.4.0.0.0-1.x86_64.rpm + sudo alien -i oracle-instantclient-devel-21.4.0.0.0-1.x86_64.rpm + - name: Install JDBC Driver + run: | + wget -q https://download.oracle.com/otn-pub/otn_software/jdbc/211/ojdbc11.jar -O ./lib/ojdbc11.jar + - name: Create database user + run: | + ./ci/setup_accounts.sh + - name: Bundle install + run: | + bundle install --jobs 4 --retry 3 + - name: Run RSpec + run: | + bundle exec rspec + - name: Workaround jruby-head failure by removing Gemfile.lock + run: | + rm Gemfile.lock + - name: Run bug report templates + run: | + cd guides/bug_report_templates + ruby active_record_gem.rb + ruby active_record_gem_spec.rb diff --git a/.rubocop.yml b/.rubocop.yml index 63ab76606..601052dbd 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -279,4 +279,4 @@ Performance/DeleteSuffix: Enabled: true Performance/OpenStruct: - Enabled: true + Enabled: true diff --git a/.travis.yml b/.travis.yml index 64a5ca82c..760fb8024 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,8 +14,8 @@ env: - DATABASE_VERSION=11.2.0.1 - ORACLE_SID=XE - DATABASE_NAME=XE - - ORA_SDTZ='Europe/Riga' #Needed as a client parameter - - TZ='Europe/Riga' #Needed as a DB Server parameter + - ORA_SDTZ='Europe/Riga' # Needed as a client parameter + - TZ='Europe/Riga' # Needed as a DB Server parameter - "JRUBY_OPTS='--debug --dev -J-Xmx1024M'" before_install: @@ -56,4 +56,4 @@ rvm: # - rvm: jruby-head notifications: - email: false + email: false diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 000000000..220127e2d --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,9 @@ +extends: default + +rules: + comments: + min-spaces-from-content: 1 + document-start: disable + line-length: disable + truthy: + check-keys: false