From 2a655dc6cf8012722846d288e50e27f285c2c83e Mon Sep 17 00:00:00 2001 From: Maxim Krizhanovski Date: Fri, 22 Mar 2024 22:22:40 +0000 Subject: [PATCH 1/2] Add linting action --- .github/workflows/lint.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..b1979ff --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,23 @@ +name: Lint +on: + - pull_request +jobs: + lint: + name: awesome-lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install awesome-lint + run: npm install -g awesome-lint + - name: Run awesome-lint + run: npx awesome-lint ./README.md + + link-check: + runs-on: ubuntu-latest + # check out the latest version of the code + steps: + - uses: actions/checkout@v4 + - name: Check links + uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + use-verbose-mode: 'yes' From 3d9f103c80b566b4309a0289f4623dbc50c2074b Mon Sep 17 00:00:00 2001 From: Maxim Krizhanovski Date: Fri, 22 Mar 2024 22:21:59 +0000 Subject: [PATCH 2/2] Apply awesome-lint rules --- README.md | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index a9b8b4d..dc4d1ba 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ A curated list of awesome RSpec-related resources ## RSpec - [RSpec official web site](https://rspec.info) -## Style guides and linters: +## Style guides and linters - [RSpec Style Guide](https://rspec.rubystyle.guide) - [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) - [rubocop-factory_bot](https://github.com/rubocop/rubocop-factory_bot) @@ -21,28 +21,28 @@ A curated list of awesome RSpec-related resources - [Effective testing with RSpec 3](https://pragprog.com/titles/rspec3/effective-testing-with-rspec-3/) - [Everyday Rails Testing with RSpec](https://leanpub.com/everydayrailsrspec) -## Matchers: -- [action_mailer_matchers](https://github.com/contently/action_mailer_matchers) RSpec matchers to test Rails' common ActionMailer functionality. -- [active_record_block_matchers](https://github.com/nwallace/active_record_block_matchers) Custom RSpec matchers for ActiveRecord record creation. -- [db-query-matchers](https://github.com/sds/db-query-matchers) RSpec matchers for database queries made by ActiveRecord. -- [mongoid-rspec](https://github.com/mongoid/mongoid-rspec) RSpec matchers for Mongoid. -- [n_plus_one_control](https://github.com/palkan/n_plus_one_control) Matchers to ensure code doesn't produce N+1 queries. -- [pundit-matchers](https://github.com/pundit-community/pundit-matchers) A set of RSpec matchers for testing Pundit authorisation policies. -- [resque_spec](https://github.com/leshill/resque_spec) A test double of Resque for RSpec. -- [rspec-graphql_matchers](https://github.com/khamusa/rspec-graphql_matchers) GraphQL matchers. -- [rspec-benchmark](https://github.com/piotrmurach/rspec-benchmark) Performance testing matchers for RSpec. -- [rspec-sidekiq](https://github.com/wspurgin/rspec-sidekiq) Simple testing of Sidekiq jobs via a collection of matchers and helpers. -- [shoulda-matchers](https://github.com/thoughtbot/shoulda-matchers) One-liners to test common Rails functionality. +## Matchers +- [action_mailer_matchers](https://github.com/contently/action_mailer_matchers) - RSpec matchers to test Rails' common ActionMailer functionality. +- [active_record_block_matchers](https://github.com/nwallace/active_record_block_matchers) - Custom RSpec matchers for ActiveRecord record creation. +- [db-query-matchers](https://github.com/sds/db-query-matchers) - RSpec matchers for database queries made by ActiveRecord. +- [mongoid-rspec](https://github.com/mongoid/mongoid-rspec) - RSpec matchers for Mongoid. +- [n_plus_one_control](https://github.com/palkan/n_plus_one_control) - Matchers to ensure code doesn't produce N+1 queries. +- [pundit-matchers](https://github.com/pundit-community/pundit-matchers) - A set of RSpec matchers for testing Pundit authorisation policies. +- [resque_spec](https://github.com/leshill/resque_spec) - A test double of Resque for RSpec. +- [rspec-graphql_matchers](https://github.com/khamusa/rspec-graphql_matchers) - GraphQL matchers. +- [rspec-benchmark](https://github.com/piotrmurach/rspec-benchmark) - Performance testing matchers for RSpec. +- [rspec-sidekiq](https://github.com/wspurgin/rspec-sidekiq) - Simple testing of Sidekiq jobs via a collection of matchers and helpers. +- [shoulda-matchers](https://github.com/thoughtbot/shoulda-matchers) - One-liners to test common Rails functionality. -## Tools: -- [active_mocker](https://github.com/zeisler/active_mocker) Creates stub classes from any ActiveRecord model. -- [database_rewinder](https://github.com/amatsuda/database_rewinder) Minimalist and ultra-fast database cleaner. -- [factory_bot](https://github.com/thoughtbot/factory_bot) A library for building database records. -- [factory_trace](https://github.com/djezzzl/factory_trace) Simple tool to maintain factories and traits from FactoryBot. -- [mutant](https://github.com/mbj/mutant) Mutation testing. -- [rspectre](https://github.com/dgollahon/rspectre) Tool to remove unused parts of the specs. -- [rspec-stubbed_env](https://github.com/pboling/rspec-stubbed_env/) Simple helper method to stub ENV values within RSpec tests. -- [spy](https://github.com/ryanong/spy) A simple opinionated mocking framework. -- [super-diff](https://github.com/mcmire/super_diff) A more helpful way to view differences between complex data structures in RSpec. -- [test-prof](https://github.com/test-prof/test-prof) Tools to analyze test suite performance +helpers to write faster tests. -- [vcr](https://github.com/vcr/vcr) Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests. +## Tools +- [active_mocker](https://github.com/zeisler/active_mocker) - Creates stub classes from any ActiveRecord model. +- [database_rewinder](https://github.com/amatsuda/database_rewinder) - Minimalist and ultra-fast database cleaner. +- [factory_bot](https://github.com/thoughtbot/factory_bot) - A library for building database records. +- [factory_trace](https://github.com/djezzzl/factory_trace) - Simple tool to maintain factories and traits from FactoryBot. +- [mutant](https://github.com/mbj/mutant) - Mutation testing. +- [rspectre](https://github.com/dgollahon/rspectre) - Tool to remove unused parts of the specs. +- [rspec-stubbed_env](https://github.com/pboling/rspec-stubbed_env/) - Simple helper method to stub ENV values within RSpec tests. +- [spy](https://github.com/ryanong/spy) - A simple opinionated mocking framework. +- [super-diff](https://github.com/mcmire/super_diff) - A more helpful way to view differences between complex data structures in RSpec. +- [test-prof](https://github.com/test-prof/test-prof) - Tools to analyze test suite performance +helpers to write faster tests. +- [vcr](https://github.com/vcr/vcr) - Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.