Skip to content

Commit

Permalink
Merge pull request #15 from scientist-softserv/knapsack-pals
Browse files Browse the repository at this point in the history
Knapsack pals
  • Loading branch information
ShanaLMoore authored May 17, 2024
2 parents 17bf6cf + 6313387 commit 8a24429
Show file tree
Hide file tree
Showing 347 changed files with 167,495 additions and 1,536 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-solr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
build:
uses: scientist-softserv/actions/.github/workflows/build.yaml@v0.0.15
uses: scientist-softserv/actions/.github/workflows/build.yaml@v0.0.22
secrets: inherit
with:
platforms: "linux/amd64"
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/build-test-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

jobs:
build:
uses: scientist-softserv/actions/.github/workflows/build.yaml@v0.0.15
uses: scientist-softserv/actions/.github/workflows/build.yaml@v0.0.22
secrets: inherit
with:
platforms: 'linux/amd64'
Expand All @@ -26,16 +26,14 @@ jobs:

test:
needs: build
uses: scientist-softserv/actions/.github/workflows/test.yaml@v0.0.15
uses: scientist-softserv/actions/.github/workflows/test.yaml@v0.0.22
with:
confdir: '/app/samvera/hyrax-webapp/solr/conf'
webTarget: hyku-web
workerTarget: hyku-worker
rspec_cmd: "cd .. && gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL"

lint:
needs: build
uses: scientist-softserv/actions/.github/workflows/lint.yaml@v0.0.15
uses: scientist-softserv/actions/.github/workflows/lint.yaml@v0.0.22
with:
webTarget: hyku-web
workerTarget: hyku-worker
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ on:

jobs:
deploy:
uses: scientist-softserv/actions/.github/workflows/deploy.yaml@v0.0.15
uses: scientist-softserv/actions/.github/workflows/deploy.yaml@v0.0.22
secrets: inherit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ scratch.md
.DS_Store

/coverage
file_cache/
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "hyrax-webapp"]
path = hyrax-webapp
url = https://github.com/samvera/hyku.git
branch = main
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require rails_helper
78 changes: 78 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
inherit_gem:
bixby: bixby_default.yml

AllCops:
NewCops: disable
TargetRubyVersion: 3.2.2
DisplayCopNames: true
Exclude:
# NOTE: When we run knapsack's rubocop, we don't want to check the submodule
# for Hyku. We'll assume it's okay and has it's own policing policies.
- "hyrax-webapp/**/*"

Metrics/BlockLength:
IgnoredMethods: ['included', 'describe', 'it', 'context']
Exclude:
- "spec/**/*.rb"

Style/AsciiComments:
Enabled: false

# rubocop suggests !thing.nil? instead, but that is NOT equivalent
Style/DoubleNegation:
Enabled: false

Style/CollectionMethods:
PreferredMethods:
collect: 'map'
collect!: 'map!'
inject: 'reduce'
detect: 'find'
find_all: 'select'

Style/SymbolArray:
Enabled: false

Style/ClassAndModuleChildren:
Enabled: false

Style/SingleLineBlockParams:
Enabled: false

Rails/ApplicationJob:
Enabled: false

Rails/ApplicationMailer:
Enabled: false

Rails/ApplicationRecord:
Enabled: false

Rails/RakeEnvironment:
Enabled: false

# We define custom methods like `find_by_user_key`,
# `find_by_created_date`, etc
Rails/DynamicFindBy:
Enabled: false

# # By default RSpec/MessageSpies has the following:
# # Prefer have_received for setting message expectations. Setup form as a spy using allow or instance_spy.
# # The default assumes EnforcedStyle is 'have_received'. Most of our specs are 'receive'
RSpec/MessageSpies:
Enabled: false

RSpec/ExpectActual:
Enabled: false

RSpec/LetSetup:
Enabled: false

RSpec/MessageExpectation:
Enabled: false

RSpec/NestedGroups:
Enabled: false

RSpec/LeadingSubject:
Enabled: false
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ FROM ghcr.io/samvera/hyku/base:latest as hyku-knap-base

# This is specifically NOT $APP_PATH but the parent directory
COPY --chown=1001:101 . /app/samvera
COPY --chown=1001:101 bundler.d/ /app/.bundler.d/
ENV BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera
ENV BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true
ENV BUNDLE_BUNDLER_INJECT__GEM_PATH=/app/samvera/bundler.d

RUN bundle install --jobs "$(nproc)"

RUN bundle install --jobs "$(nproc)"

# Ensure root permissions for installing Tesseract data
USER root
Expand All @@ -21,4 +27,4 @@ RUN RAILS_ENV=production SECRET_KEY_BASE=`bin/rake secret` DB_ADAPTER=nulldb DB_
CMD ./bin/web

FROM hyku-web as hyku-worker
CMD ./bin/worker
CMD ./bin/worker
Loading

0 comments on commit 8a24429

Please sign in to comment.