diff --git a/.github/prepare-docker-image/action.yml b/.github/prepare-docker-image/action.yml index 86c129b2..53c709a3 100644 --- a/.github/prepare-docker-image/action.yml +++ b/.github/prepare-docker-image/action.yml @@ -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 diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index fd2d6450..e4920328 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,6 +1,6 @@ name: Checks -on: +on: # yamllint disable-line rule:truthy push: branches: - master @@ -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 @@ -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 @@ -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 . diff --git a/.github/yamllint.yml b/.github/yamllint.yml new file mode 100644 index 00000000..d5c44807 --- /dev/null +++ b/.github/yamllint.yml @@ -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 diff --git a/.rubocop.yml b/.rubocop.yml index 7b0f8710..11790d85 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -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 diff --git a/config/reverser.yml b/config/reverser.yml index 155257fb..45bfe247 100644 --- a/config/reverser.yml +++ b/config/reverser.yml @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 43d9c504..4ffc10d1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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