Skip to content

Commit

Permalink
Merge pull request #97 from Earlopain/yamllint
Browse files Browse the repository at this point in the history
Yamllint
  • Loading branch information
Earlopain authored Sep 25, 2023
2 parents 48f8721 + 6f1cf86 commit f4b6502
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/prepare-docker-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ runs:
using: composite
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
cache-from: type=gha
load: true
Expand Down
23 changes: 18 additions & 5 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Checks

on:
on: # yamllint disable-line rule:truthy
push:
branches:
- master
Expand All @@ -17,10 +17,10 @@ jobs:

steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
cache-from: type=gha
cache-to: type=gha,mode=max
Expand All @@ -47,7 +47,7 @@ jobs:
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/prepare-docker-image

- name: Create DB
Expand All @@ -61,8 +61,21 @@ jobs:
needs: docker-build

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/prepare-docker-image

- name: Run Rubocop
run: $DOCKER_RUN bundle exec rubocop --format github

yamllint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"

- run: >
pip install yamllint==1.32.0 &&
yamllint -c .github/yamllint.yml -s .
17 changes: 17 additions & 0 deletions .github/yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
extends: default

ignore: |
pnpm-lock.yaml
rules:
document-start: disable
line-length: disable
quoted-strings:
quote-type: double
required: only-when-needed
comments:
min-spaces-from-content: 1
empty-lines:
max: 1
indentation:
spaces: 2
14 changes: 7 additions & 7 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ Metrics/AbcSize:

Metrics/BlockLength:
AllowedMethods:
- "class_methods"
- "concerning"
- "describe"
- "define"
- "FactoryBot.define"
- class_methods
- concerning
- describe
- define
- FactoryBot.define
Exclude:
- "config/routes.rb"
- "test/factories/web/**/*"
- config/routes.rb
- test/factories/web/**/*

Metrics/ClassLength:
Enabled: false
Expand Down
6 changes: 3 additions & 3 deletions config/reverser.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Provide a overwrite file with REVERSER_CUSTOM_CONFIG_PATH
app_name: "Reverser"
app_name: Reverser
# How large should the generated thumbnails be
# This is a bounding box
thumbnail_size: 300
# The server which handles similar images search
# Must respond like https://github.com/danbooru/iqdb
iqdb_server: "http://iqdb:5588"
selenium_url: "http://selenium:4444"
iqdb_server: http://iqdb:5588
selenium_url: http://selenium:4444

# Only overwriteable through env
custom_config_path: config/reverser_custom_config.yml
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ services:
- 5432:5432

iqdb:
image: ghcr.io/e621ng/iqdb:d4fed9d9a51184e72d2f14d4ec461d7830bd177a
image: ghcr.io/e621ng/iqdb:d4fed9d9a51184e72d2f14d4ec461d7830bd177a
volumes:
- ${REVERSER_DATA_PATH}/iqdb_data:/iqdb

Expand Down

0 comments on commit f4b6502

Please sign in to comment.