mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 21:25:39 +02:00
Merge remote-tracking branch 'origin/master' into log-bounced-emails
This commit is contained in:
commit
e9746c9ee9
7 changed files with 125 additions and 53 deletions
117
.github/workflows/ruby.yml
vendored
Normal file
117
.github/workflows/ruby.yml
vendored
Normal file
|
@ -0,0 +1,117 @@
|
||||||
|
name: Github Testing
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:12
|
||||||
|
ports: ["5432:5432"]
|
||||||
|
env:
|
||||||
|
POSTGRES_PASSWORD: password
|
||||||
|
POSTGRES_USERNAME: postgres
|
||||||
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-18.04]
|
||||||
|
ruby: [2.6, 2.7 ]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: ${{ matrix.ruby }}
|
||||||
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||||
|
- name: config bundler
|
||||||
|
run: |
|
||||||
|
bundle config set without 'development staging production'
|
||||||
|
bundle config set deployment '[secure]'
|
||||||
|
bundle env
|
||||||
|
head -n1 $(which bundle)
|
||||||
|
|
||||||
|
- name: Set ENV for codeclimate (pull_request)
|
||||||
|
run: |
|
||||||
|
git fetch --no-tags --prune --depth=1 origin +refs/heads/$GITHUB_HEAD_REF:refs/remotes/origin/$GITHUB_HEAD_REF
|
||||||
|
echo "GIT_BRANCH=$GITHUB_HEAD_REF" >> $GITHUB_ENV
|
||||||
|
echo "GIT_COMMIT_SHA=$(git rev-parse origin/$GITHUB_HEAD_REF)" >> $GITHUB_ENV
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
|
||||||
|
- name: Set ENV for codeclimate (push)
|
||||||
|
run: |
|
||||||
|
echo "GIT_BRANCH=$GITHUB_REF" >> $GITHUB_ENV
|
||||||
|
echo "GIT_COMMIT_SHA=$GITHUB_SHA" >> $GITHUB_ENV
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
|
||||||
|
- name: Prepare CodeClimate
|
||||||
|
env:
|
||||||
|
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
||||||
|
run: |
|
||||||
|
curl -LSs 'https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64' >./cc-test-reporter;
|
||||||
|
chmod +x ./cc-test-reporter
|
||||||
|
./cc-test-reporter before-build
|
||||||
|
|
||||||
|
- name: Run Tests
|
||||||
|
env:
|
||||||
|
PG_DATABASE: postgres
|
||||||
|
PG_HOST: localhost
|
||||||
|
PG_USER: postgres
|
||||||
|
PG_PASSWORD: password
|
||||||
|
PG_PORT: ${{ job.services.postgres.ports[5432] }}
|
||||||
|
RAILS_ENV: test
|
||||||
|
COVERAGE: true
|
||||||
|
DISABLE_SPRING: 1
|
||||||
|
run: |
|
||||||
|
cp config/application.yml.sample config/application.yml
|
||||||
|
cp config/database_travis.yml config/database.yml
|
||||||
|
echo "openssl_config_path: 'test/fixtures/files/test_ca/openssl.cnf'" >> config/application.yml
|
||||||
|
echo "crl_dir: 'test/fixtures/files/test_ca/crl'" >> config/application.yml
|
||||||
|
echo "crl_path: 'test/fixtures/files/test_ca/crl/crl.pem'" >> config/application.yml
|
||||||
|
echo "ca_cert_path: 'test/fixtures/files/test_ca/certs/ca.crt.pem'" >> config/application.yml
|
||||||
|
echo "ca_key_path: 'test/fixtures/files/test_ca/private/ca.key.pem'" >> config/application.yml
|
||||||
|
echo "ca_key_password: 'password'" >> config/application.yml
|
||||||
|
bundle exec rake db:setup:all
|
||||||
|
bundle exec rails test test/*
|
||||||
|
- name: Save coverage
|
||||||
|
run: ./cc-test-reporter format-coverage --output coverage/codeclimate.${{ matrix.ruby }}.json
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: coverage-${{ matrix.ruby }}
|
||||||
|
path: coverage/codeclimate.${{ matrix.ruby }}.json
|
||||||
|
|
||||||
|
upload_coverage:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
|
env:
|
||||||
|
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
||||||
|
CC_TEST_REPORTER_URL: https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
|
||||||
|
|
||||||
|
needs: test
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Download test coverage reporter
|
||||||
|
run: curl -L $CC_TEST_REPORTER_URL > cc-test-reporter
|
||||||
|
|
||||||
|
- name: Give test coverage reporter executable permissions
|
||||||
|
run: chmod +x cc-test-reporter
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: coverage-2.6
|
||||||
|
path: coverage
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: coverage-2.7
|
||||||
|
path: coverage
|
||||||
|
|
||||||
|
- name: Aggregate & upload results to Code Climate
|
||||||
|
run: |
|
||||||
|
./cc-test-reporter sum-coverage coverage/codeclimate.*.json
|
||||||
|
./cc-test-reporter upload-coverage
|
||||||
|
|
35
.travis.yml
35
.travis.yml
|
@ -1,35 +0,0 @@
|
||||||
language: ruby
|
|
||||||
cache: bundler
|
|
||||||
env:
|
|
||||||
- DB=postgresql
|
|
||||||
before_install:
|
|
||||||
- "wget -N http://chromedriver.storage.googleapis.com/2.43/chromedriver_linux64.zip -P ~/"
|
|
||||||
- "unzip ~/chromedriver_linux64.zip -d ~/"
|
|
||||||
- "rm ~/chromedriver_linux64.zip"
|
|
||||||
- "sudo mv -f ~/chromedriver /usr/local/share/"
|
|
||||||
- "sudo chmod +x /usr/local/share/chromedriver"
|
|
||||||
- "sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver"
|
|
||||||
- "bundle config set without 'development staging production'"
|
|
||||||
- "bundle config set deployment '[secure]'"
|
|
||||||
before_script:
|
|
||||||
- "cp config/application.yml.sample config/application.yml"
|
|
||||||
- "echo \"openssl_config_path: 'test/fixtures/files/test_ca/openssl.cnf'\" >> config/application.yml"
|
|
||||||
- "echo \"crl_dir: 'test/fixtures/files/test_ca/crl'\" >> config/application.yml"
|
|
||||||
- "echo \"crl_path: 'test/fixtures/files/test_ca/crl/crl.pem'\" >> config/application.yml"
|
|
||||||
- "echo \"ca_cert_path: 'test/fixtures/files/test_ca/certs/ca.crt.pem'\" >> config/application.yml"
|
|
||||||
- "echo \"ca_key_path: 'test/fixtures/files/test_ca/private/ca.key.pem'\" >> config/application.yml"
|
|
||||||
- "echo \"ca_key_password: 'password'\" >> config/application.yml"
|
|
||||||
- "cp config/database_travis.yml config/database.yml"
|
|
||||||
- "bundle exec rake db:setup:all"
|
|
||||||
- "curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter"
|
|
||||||
- "chmod +x ./cc-test-reporter"
|
|
||||||
- "./cc-test-reporter before-build"
|
|
||||||
after_script:
|
|
||||||
- "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT"
|
|
||||||
script:
|
|
||||||
- "bundle exec rails test test/*"
|
|
||||||
services:
|
|
||||||
- postgresql
|
|
||||||
addons:
|
|
||||||
postgresql: "9.4"
|
|
||||||
chrome: stable
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
08.12.2020
|
||||||
|
* Replaced Travis-CI with GitHub Actions [#1746](https://github.com/internetee/registry/pull/1746)
|
||||||
|
|
||||||
01.12.2020
|
01.12.2020
|
||||||
* Refactored clientHold for interactors [#1751](https://github.com/internetee/registry/issues/1751)
|
* Refactored clientHold for interactors [#1751](https://github.com/internetee/registry/issues/1751)
|
||||||
* Fixed internal error on removing clientHold status when not present [#1766](https://github.com/internetee/registry/issues/1766)
|
* Fixed internal error on removing clientHold status when not present [#1766](https://github.com/internetee/registry/issues/1766)
|
||||||
|
|
6
Gemfile
6
Gemfile
|
@ -73,15 +73,11 @@ gem 'e_invoice', github: 'internetee/e_invoice', branch: :master
|
||||||
gem 'lhv', github: 'internetee/lhv', branch: 'master'
|
gem 'lhv', github: 'internetee/lhv', branch: 'master'
|
||||||
gem 'domain_name'
|
gem 'domain_name'
|
||||||
gem 'haml', '~> 5.0'
|
gem 'haml', '~> 5.0'
|
||||||
|
gem 'rexml'
|
||||||
gem 'wkhtmltopdf-binary', '~> 0.12.5.1'
|
gem 'wkhtmltopdf-binary', '~> 0.12.5.1'
|
||||||
|
|
||||||
gem 'directo', github: 'internetee/directo', branch: 'master'
|
gem 'directo', github: 'internetee/directo', branch: 'master'
|
||||||
|
|
||||||
group :development do
|
|
||||||
# deploy
|
|
||||||
gem 'listen', '3.2.1'
|
|
||||||
gem 'mina', '0.3.1' # for fast deployment
|
|
||||||
end
|
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
gem 'pry', '0.10.1'
|
gem 'pry', '0.10.1'
|
||||||
|
|
14
Gemfile.lock
14
Gemfile.lock
|
@ -250,9 +250,6 @@ GEM
|
||||||
kaminari-core (= 1.2.1)
|
kaminari-core (= 1.2.1)
|
||||||
kaminari-core (1.2.1)
|
kaminari-core (1.2.1)
|
||||||
libxml-ruby (3.2.0)
|
libxml-ruby (3.2.0)
|
||||||
listen (3.2.1)
|
|
||||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
||||||
rb-inotify (~> 0.9, >= 0.9.10)
|
|
||||||
logger (1.4.2)
|
logger (1.4.2)
|
||||||
loofah (2.7.0)
|
loofah (2.7.0)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
|
@ -266,9 +263,6 @@ GEM
|
||||||
mime-types-data (~> 3.2015)
|
mime-types-data (~> 3.2015)
|
||||||
mime-types-data (3.2020.0512)
|
mime-types-data (3.2020.0512)
|
||||||
mimemagic (0.3.5)
|
mimemagic (0.3.5)
|
||||||
mina (0.3.1)
|
|
||||||
open4 (~> 1.3.4)
|
|
||||||
rake
|
|
||||||
mini_mime (1.0.2)
|
mini_mime (1.0.2)
|
||||||
mini_portile2 (2.4.0)
|
mini_portile2 (2.4.0)
|
||||||
minitest (5.14.2)
|
minitest (5.14.2)
|
||||||
|
@ -296,7 +290,6 @@ GEM
|
||||||
omniauth-rails_csrf_protection (0.1.2)
|
omniauth-rails_csrf_protection (0.1.2)
|
||||||
actionpack (>= 4.2)
|
actionpack (>= 4.2)
|
||||||
omniauth (>= 1.3.1)
|
omniauth (>= 1.3.1)
|
||||||
open4 (1.3.4)
|
|
||||||
openid_connect (1.2.0)
|
openid_connect (1.2.0)
|
||||||
activemodel
|
activemodel
|
||||||
attr_required (>= 1.0.0)
|
attr_required (>= 1.0.0)
|
||||||
|
@ -370,9 +363,6 @@ GEM
|
||||||
activesupport (>= 5.2.1)
|
activesupport (>= 5.2.1)
|
||||||
i18n
|
i18n
|
||||||
polyamorous (= 2.3.2)
|
polyamorous (= 2.3.2)
|
||||||
rb-fsevent (0.10.4)
|
|
||||||
rb-inotify (0.10.1)
|
|
||||||
ffi (~> 1.0)
|
|
||||||
rbtree3 (0.6.0)
|
rbtree3 (0.6.0)
|
||||||
regexp_parser (1.8.0)
|
regexp_parser (1.8.0)
|
||||||
request_store (1.5.0)
|
request_store (1.5.0)
|
||||||
|
@ -385,6 +375,7 @@ GEM
|
||||||
http-cookie (>= 1.0.2, < 2.0)
|
http-cookie (>= 1.0.2, < 2.0)
|
||||||
mime-types (>= 1.16, < 4.0)
|
mime-types (>= 1.16, < 4.0)
|
||||||
netrc (~> 0.8)
|
netrc (~> 0.8)
|
||||||
|
rexml (3.2.4)
|
||||||
ruby2_keywords (0.0.2)
|
ruby2_keywords (0.0.2)
|
||||||
rubyzip (2.3.0)
|
rubyzip (2.3.0)
|
||||||
sass-rails (6.0.0)
|
sass-rails (6.0.0)
|
||||||
|
@ -519,8 +510,6 @@ DEPENDENCIES
|
||||||
jquery-ui-rails (= 5.0.5)
|
jquery-ui-rails (= 5.0.5)
|
||||||
kaminari
|
kaminari
|
||||||
lhv!
|
lhv!
|
||||||
listen (= 3.2.1)
|
|
||||||
mina (= 0.3.1)
|
|
||||||
minitest (~> 5.14)
|
minitest (~> 5.14)
|
||||||
money-rails
|
money-rails
|
||||||
nokogiri
|
nokogiri
|
||||||
|
@ -537,6 +526,7 @@ DEPENDENCIES
|
||||||
rails (~> 6.0)
|
rails (~> 6.0)
|
||||||
ransack (~> 2.3)
|
ransack (~> 2.3)
|
||||||
rest-client
|
rest-client
|
||||||
|
rexml
|
||||||
sass-rails
|
sass-rails
|
||||||
select2-rails (= 3.5.9.3)
|
select2-rails (= 3.5.9.3)
|
||||||
selectize-rails (= 0.12.1)
|
selectize-rails (= 0.12.1)
|
||||||
|
|
|
@ -4,7 +4,7 @@ default: &default
|
||||||
encoding: unicode
|
encoding: unicode
|
||||||
pool: 5
|
pool: 5
|
||||||
username: postgres
|
username: postgres
|
||||||
password:
|
password: password
|
||||||
|
|
||||||
test:
|
test:
|
||||||
<<: *default
|
<<: *default
|
||||||
|
|
|
@ -6,6 +6,7 @@ if ENV['COVERAGE']
|
||||||
add_filter '/lib/core_monkey_patches/'
|
add_filter '/lib/core_monkey_patches/'
|
||||||
add_filter '/lib/daemons/'
|
add_filter '/lib/daemons/'
|
||||||
add_filter '/lib/gem_monkey_patches/'
|
add_filter '/lib/gem_monkey_patches/'
|
||||||
|
add_filter '/lib/tasks/'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue