-
Notifications
You must be signed in to change notification settings - Fork 8
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
Showing
276 changed files
with
7,028 additions
and
2,512 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 @@ | ||
.git |
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,17 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.go] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = tab | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
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,29 @@ | ||
RAILS_SECRET_KEY_BASE=865a7ffac1ee450bd7cd4162f136de03bacdb73644f463512db8da81e21e24e6885b76c104cbb3d0513112e47dc102ce9909a25c62c2061d27b134e29a61e55d | ||
RAILS_ENV=test | ||
|
||
PUMA_MIN_THREADS=2 | ||
PUMA_MAX_THREADS=5 | ||
WEB_CONCURRENCY=0 | ||
|
||
DATABASE_HOST=postgres | ||
DATABASE_NAME=shizoid | ||
DATABASE_PASSWORD=WoZ7w2e3 | ||
DATABASE_PORT=5432 | ||
DATABASE_USERNAME=shizoid | ||
DB_POOL_SIZE=40 | ||
|
||
SIDEKIQ_CONCURRENCY=25 | ||
REDIS_HOST=redis | ||
REDIS_PORT=6379 | ||
REDIS_SIDEKIQ_DB=1 | ||
REDIS_CONTEXT_DB=2 | ||
# REDIS_PASSWORD= | ||
CONTEXT_SIZE=50 | ||
|
||
WEBHOOK_URL=https://localhost | ||
TELEGRAM_TOKEN=111111111:11111111111111111111111111111111111 | ||
BOT_OWNERS=11111,222222 | ||
# ALLOW_TO_ALL=true | ||
|
||
#SENTRY_DSN= | ||
STOPCOVID_URL=https://xn--80aesfpebagmfblc0a.xn--p1ai |
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 @@ | ||
install: --no-document |
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,79 @@ | ||
name: Shizoid | ||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
rspec: | ||
name: Perform specs | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:alpine | ||
env: | ||
POSTGRES_USER: shizoid | ||
POSTGRES_PASSWORD: WoZ7w2e3 | ||
POSTGRES_DB: shizoid_test | ||
ports: | ||
- 5432:5432 | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
redis: | ||
image: redis:alpine | ||
ports: | ||
- 6379:6379 | ||
options: --entrypoint redis-server | ||
steps: | ||
- name: 'Checkout repository' | ||
uses: actions/checkout@v2 | ||
- name: 'Setup Ruby' | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.0 | ||
- name: "Install required system packages" | ||
run: sudo apt-get update -y && sudo apt-get install openssh-client rsync libpq-dev cmake -y | ||
- name: "Bundle install" | ||
run: | | ||
gem install bundler && bundle update --bundler && bundle -v | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
- name: "Rails test" | ||
run: | | ||
export $(grep -v '#' .env.test | grep '=' | xargs) | ||
export DATABASE_HOST=127.0.0.1 | ||
export REDIS_HOST=127.0.0.1 | ||
bundle exec rails db:setup --trace | ||
bundle exec rails test | ||
bundle exec rspec | ||
bundle exec rails zeitwerk:check | ||
build: | ||
name: Build and upload image | ||
runs-on: ubuntu-latest | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
needs: rspec | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Save current version to file | ||
run: git rev-parse --short HEAD > .version | ||
|
||
- name: Buildah Action | ||
id: build-image | ||
uses: redhat-actions/buildah-build@v2 | ||
with: | ||
image: shizoid | ||
tags: latest ${{ github.sha }} | ||
containerfiles: ./config/deploy/Containerfile | ||
|
||
- name: Push to docker hub | ||
uses: redhat-actions/push-to-registry@v2 | ||
with: | ||
image: ${{ steps.build-image.outputs.image }} | ||
tags: ${{ steps.build-image.outputs.tags }} | ||
registry: docker.io/${{ secrets.DOCKER_USER }} | ||
username: ${{ secrets.DOCKER_USER }} | ||
password: ${{ secrets.DOCKER_TOKEN }} |
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,10 +1,15 @@ | ||
/.bundle | ||
/log/* | ||
/tmp/* | ||
!/log/.keep | ||
!/tmp/.keep | ||
.byebug_history | ||
config/secrets.yml | ||
config/database.yml | ||
config/deploy.rb | ||
config/newrelic.yml | ||
.idea | ||
.vagrant | ||
.version | ||
*.sublime-project | ||
*.sublime-workspace | ||
/.bundle | ||
/log/* | ||
/tmp/* | ||
coverage | ||
db/backups | ||
receiver/tmp | ||
.env |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
--color | ||
--format d | ||
--require spec_helper | ||
--require rails_helper | ||
--order rand |
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,8 +1,37 @@ | ||
inherit_from: .rubocop_todo.yml | ||
|
||
require: | ||
- rubocop-performance | ||
- rubocop-rspec | ||
- rubocop-rails | ||
|
||
AllCops: | ||
TargetRubyVersion: 2.5 | ||
TargetRubyVersion: 3.1 | ||
Exclude: | ||
- db/schema.rb | ||
- bin/* | ||
|
||
Documentation: | ||
Enabled: false | ||
|
||
Metrics/LineLength: | ||
Max: 120 | ||
Max: 130 | ||
|
||
Metrics/MethodLength: | ||
Metrics/BlockLength: | ||
Max: 50 | ||
ExcludedMethods: | ||
- describe | ||
- context | ||
- path | ||
- get | ||
- patch | ||
- put | ||
- post | ||
- delete | ||
|
||
Style/NumericPredicate: | ||
Exclude: | ||
- spec/**/* | ||
|
||
Metrics/AbcSize: | ||
Max: 30 |
Oops, something went wrong.