diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 8bad8c8..2bc385d 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -5,6 +5,10 @@ on: - master - '**' +permissions: + contents: read + id-token: write # for QLTY code coverage (https://docs.qlty.sh/migration/coverage) + jobs: test: name: Test @@ -23,11 +27,10 @@ jobs: - name: Run Tests with coverage run: npm run test:cov - - uses: paambaati/codeclimate-action@v5.0.0 - env: - CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_ID }} + - uses: qltysh/qlty-action/coverage@v1 with: - coverageLocations: coverage/lcov.info:lcov + oidc: true + files: coverage/lcov.info release: name: Create Release diff --git a/.qlty/.gitignore b/.qlty/.gitignore new file mode 100644 index 0000000..3036618 --- /dev/null +++ b/.qlty/.gitignore @@ -0,0 +1,7 @@ +* +!configs +!configs/** +!hooks +!hooks/** +!qlty.toml +!.gitignore diff --git a/.qlty/configs/.hadolint.yaml b/.qlty/configs/.hadolint.yaml new file mode 100644 index 0000000..8f7e23e --- /dev/null +++ b/.qlty/configs/.hadolint.yaml @@ -0,0 +1,2 @@ +ignored: + - DL3008 diff --git a/.qlty/configs/.yamllint.yaml b/.qlty/configs/.yamllint.yaml new file mode 100644 index 0000000..d22fa77 --- /dev/null +++ b/.qlty/configs/.yamllint.yaml @@ -0,0 +1,8 @@ +rules: + document-start: disable + quoted-strings: + required: only-when-needed + extra-allowed: ["{|}"] + key-duplicates: {} + octal-values: + forbid-implicit-octal: true diff --git a/.qlty/qlty.toml b/.qlty/qlty.toml new file mode 100644 index 0000000..21e9405 --- /dev/null +++ b/.qlty/qlty.toml @@ -0,0 +1,121 @@ +# This file was automatically generated by `qlty init`. +# You can modify it to suit your needs. +# We recommend you to commit this file to your repository. +# +# This configuration is used by both Qlty CLI and Qlty Cloud. +# +# Qlty CLI -- Code quality toolkit for developers +# Qlty Cloud -- Fully automated Code Health Platform +# +# Try Qlty Cloud: https://qlty.sh +# +# For a guide to configuration, visit https://qlty.sh/d/config +# Or for a full reference, visit https://qlty.sh/d/qlty-toml +config_version = "0" + +exclude_patterns = [ + "*_min.*", + "*-min.*", + "*.min.*", + "**/.yarn/**", + "**/*.d.ts", + "**/assets/**", + "**/bower_components/**", + "**/build/**", + "**/cache/**", + "**/config/**", + "**/db/**", + "**/deps/**", + "**/dist/**", + "**/extern/**", + "**/external/**", + "**/generated/**", + "**/Godeps/**", + "**/gradlew/**", + "**/mvnw/**", + "**/node_modules/**", + "**/protos/**", + "**/seed/**", + "**/target/**", + "**/templates/**", + "**/testdata/**", + "**/vendor/**", +] + +test_patterns = [ + "**/test/**", + "**/spec/**", + "**/*.test.*", + "**/*.spec.*", + "**/*_test.*", + "**/*_spec.*", + "**/test_*.*", + "**/spec_*.*", +] + +[smells] +mode = "comment" + +[[source]] +name = "default" +default = true + + +[[plugin]] +name = "actionlint" + +[[plugin]] +name = "checkov" + +[[plugin]] +name = "dockerfmt" + +[[plugin]] +name = "dotenv-linter" +mode = "comment" + +[[plugin]] +name = "eslint" +version = "9.32.0" +package_file = "package.json" +package_filters = ["eslint", "jest", "prettier"] + +[[plugin]] +name = "hadolint" + +[[plugin]] +name = "markdownlint" +mode = "comment" + +[[plugin]] +name = "osv-scanner" + +[[plugin]] +name = "prettier" +version = "3.6.2" +package_file = "package.json" +package_filters = ["prettier"] + +[[plugin]] +name = "radarlint-iac" +mode = "monitor" + +[[plugin]] +name = "radarlint-js" + +[[plugin]] +name = "ripgrep" +mode = "comment" + +[[plugin]] +name = "trivy" +drivers = [ + "config", + "fs-vuln", +] + +[[plugin]] +name = "trufflehog" + +[[plugin]] +name = "yamllint" diff --git a/README.md b/README.md index ba9c957..3f87d27 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,3 @@ -[![Maintainability](https://api.codeclimate.com/v1/badges/f64d334dac765d672119/maintainability)](https://codeclimate.com/github/Aam-Digital/replication-backend/maintainability) -[![Test Coverage](https://api.codeclimate.com/v1/badges/f64d334dac765d672119/test_coverage)](https://codeclimate.com/github/Aam-Digital/replication-backend/test_coverage) - # Replication Backend This backend service can be used to filter the replication between a [PouchDB](https://pouchdb.com/) and a [CouchDB](https://docs.couchdb.org/en/stable/index.html) instance based on permission rules.