-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from crazyoptimist/chore/sync-update-from-post…
…gres Sync updates from postgres branch
- Loading branch information
Showing
17 changed files
with
518 additions
and
143 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
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,18 @@ | ||
# Story | ||
|
||
# Acceptance Criteria | ||
|
||
- [ ] | ||
|
||
# Screenshots / Video | ||
|
||
<details> | ||
<summary></summary> | ||
|
||
</details> | ||
|
||
# Testing Instructions and Sample Files | ||
|
||
- | ||
|
||
# Notes |
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,16 @@ | ||
# Story | ||
|
||
Refs #issuenumber | ||
|
||
# Expected Behavior Before Changes | ||
|
||
# Expected Behavior After Changes | ||
|
||
# Screenshots / Video | ||
|
||
<details> | ||
<summary></summary> | ||
|
||
</details> | ||
|
||
# Notes |
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,109 @@ | ||
name: 'Build & Lint' | ||
run-name: Build & Lint of ${{ github.ref_name }} by @${{ github.actor }} | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
inputs: | ||
debug_enabled: | ||
type: boolean | ||
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | ||
required: false | ||
default: false | ||
|
||
env: | ||
GITHUB_REPOSITORY: ${{ github.repository }} | ||
REGISTRY: ghcr.io | ||
TAG: ${{ github.sha }} | ||
DOCKER_BUILDKIT: 1 | ||
COMPOSE_DOCKER_CLI_BUILD: 1 | ||
MONGO_URL: "mongodb://user:password@db:27017/slack_bot_dev" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
token: ${{ secrets.PAT }} | ||
|
||
- name: Set up QEMU | ||
|
||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.PAT }} | ||
|
||
- name: Setup tmate session | ||
uses: mxschmitt/action-tmate@v3 | ||
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | ||
with: | ||
limit-access-to-actor: true | ||
|
||
- name: Retag action for web | ||
id: meta-web | ||
uses: docker/metadata-action@v4.1.1 | ||
with: | ||
images: | | ||
name=${{ env.REGISTRY }}/${{ env.GITHUB_REPOSITORY }} | ||
tags: | | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
- name: Build and push web | ||
uses: docker/build-push-action@v3 | ||
with: | ||
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.GITHUB_REPOSITORY }}:latest | ||
context: . | ||
file: Dockerfile | ||
platforms: 'linux/amd64' | ||
push: true | ||
tags: | | ||
${{ steps.meta-web.outputs.tags }} | ||
${{ env.REGISTRY }}/${{ env.GITHUB_REPOSITORY }}:${{ env.TAG }} | ||
target: web | ||
|
||
lint: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
|
||
- name: Github Container Login | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.PAT }} | ||
|
||
- name: Pull web image to prevent build | ||
env: | ||
IMAGE_URI: '${{ env.REGISTRY }}/${{ env.GITHUB_REPOSITORY }}:${{ env.TAG }}' | ||
run: >- | ||
docker pull "$IMAGE_URI" | ||
- name: Run Rubocop | ||
run: >- | ||
[ -f "db/schema.rb" ] && chmod 777 db/schema.rb; | ||
cp .env.example .env; | ||
docker compose run -T web sh -c "bundle exec rubocop --parallel --format junit --out rubocop.xml" | ||
- name: Publish Linting Report | ||
uses: mikepenz/action-junit-report@v3 | ||
if: always() # always run even if the previous step fails | ||
with: | ||
report_paths: 'rubocop*.xml' |
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 @@ | ||
inherit_from: .rubocop_todo.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 |
---|---|---|
@@ -0,0 +1,164 @@ | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2023-10-29 22:34:19 UTC using RuboCop version 1.31.2. | ||
# The point is for the user to remove these configuration records | ||
# one by one as the offenses are removed from the code base. | ||
# Note that changes in the inspected code, or installation of new | ||
# versions of RuboCop, may require this file to be generated again. | ||
|
||
# Offense count: 6 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Layout/EmptyLineAfterGuardClause: | ||
Exclude: | ||
- 'bin/bundle' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Layout/EmptyLines: | ||
Exclude: | ||
- 'config/environments/development.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment. | ||
Layout/ExtraSpacing: | ||
Exclude: | ||
- 'config/environments/production.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle, IndentationWidth. | ||
# SupportedStyles: aligned, indented | ||
Layout/MultilineOperationIndentation: | ||
Exclude: | ||
- 'bin/bundle' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator. | ||
# SupportedStylesForExponentOperator: space, no_space | ||
Layout/SpaceAroundOperators: | ||
Exclude: | ||
- 'config/environments/production.rb' | ||
|
||
# Offense count: 2 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets. | ||
# SupportedStyles: space, no_space, compact | ||
# SupportedStylesForEmptyBrackets: space, no_space | ||
Layout/SpaceInsideArrayLiteralBrackets: | ||
Exclude: | ||
- 'config/environments/production.rb' | ||
|
||
# Offense count: 2 | ||
Lint/UselessAssignment: | ||
Exclude: | ||
- 'bot/actions/modal.rb' | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: IgnoredMethods. | ||
Metrics/CyclomaticComplexity: | ||
Max: 9 | ||
|
||
# Offense count: 3 | ||
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. | ||
Metrics/MethodLength: | ||
Max: 62 | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: IgnoredMethods. | ||
Metrics/PerceivedComplexity: | ||
Max: 9 | ||
|
||
# Offense count: 1 | ||
# This cop supports unsafe autocorrection (--autocorrect-all). | ||
Style/CaseLikeIf: | ||
Exclude: | ||
- 'bot/actions/quiz.rb' | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: AllowedConstants. | ||
Style/Documentation: | ||
Exclude: | ||
- 'spec/**/*' | ||
- 'test/**/*' | ||
- 'config/application.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Style/ExpandPathArguments: | ||
Exclude: | ||
- 'bin/bundle' | ||
|
||
# Offense count: 43 | ||
# This cop supports unsafe autocorrection (--autocorrect-all). | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: always, always_true, never | ||
Style/FrozenStringLiteralComment: | ||
Enabled: false | ||
|
||
# Offense count: 1 | ||
# This cop supports unsafe autocorrection (--autocorrect-all). | ||
Style/GlobalStdStream: | ||
Exclude: | ||
- 'config/environments/production.rb' | ||
|
||
# Offense count: 2 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Style/IfUnlessModifier: | ||
Exclude: | ||
- 'bin/bundle' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Style/PerlBackrefs: | ||
Exclude: | ||
- 'bin/bundle' | ||
|
||
# Offense count: 2 | ||
# This cop supports unsafe autocorrection (--autocorrect-all). | ||
# Configuration parameters: SafeForConstants. | ||
Style/RedundantFetchBlock: | ||
Exclude: | ||
- 'config/puma.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports unsafe autocorrection (--autocorrect-all). | ||
# Configuration parameters: RequireEnglish. | ||
# SupportedStyles: use_perl_names, use_english_names, use_builtin_english_names | ||
Style/SpecialGlobalVars: | ||
EnforcedStyle: use_perl_names | ||
|
||
# Offense count: 60 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. | ||
# SupportedStyles: single_quotes, double_quotes | ||
Style/StringLiterals: | ||
Exclude: | ||
- 'bin/bundle' | ||
- 'bin/rails' | ||
- 'bin/rake' | ||
- 'bin/setup' | ||
- 'config/application.rb' | ||
- 'config/boot.rb' | ||
- 'config/environment.rb' | ||
- 'config/environments/development.rb' | ||
- 'config/environments/production.rb' | ||
- 'config/environments/test.rb' | ||
- 'config/puma.rb' | ||
- 'config/spring.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: . | ||
# SupportedStyles: percent, brackets | ||
Style/SymbolArray: | ||
EnforcedStyle: percent | ||
MinSize: 10 | ||
|
||
# Offense count: 2 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns. | ||
# URISchemes: http, https | ||
Layout/LineLength: | ||
Max: 198 |
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,4 +1,4 @@ | ||
FROM ruby:3.1.3 | ||
FROM ruby:3.1.3 as web | ||
WORKDIR /app | ||
|
||
COPY Gemfile* ./ | ||
|
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.