Skip to content

ci: Add tasks to run unit tests and GitHub workflow to run non-storage unit tests. - #30

Merged
sitaowang1998 merged 20 commits into
y-scope:mainfrom
sitaowang1998:unit-test-workflow
Dec 6, 2024
Merged

ci: Add tasks to run unit tests and GitHub workflow to run non-storage unit tests.#30
sitaowang1998 merged 20 commits into
y-scope:mainfrom
sitaowang1998:unit-test-workflow

Conversation

@sitaowang1998

@sitaowang1998 sitaowang1998 commented Dec 1, 2024

Copy link
Copy Markdown
Collaborator

Description

Add unit test to github workflow. Unit tests with "[storage]" tag requires MySQL set up to run, so they are excluded from the workflow.

Validation performed

  • Github workflow started unit test and succeeded.

Summary by CodeRabbit

  • New Features

    • Introduced a new CI/CD pipeline for running unit tests, triggered on pull requests and scheduled events.
    • Added a structured configuration for managing unit testing tasks, allowing for more granular control over test execution.
    • New tasks for building and cleaning components have been defined.
  • Enhancements

    • Expanded YAML linting to cover additional files for improved validation.
    • Simplified code linting checks workflow for clearer execution.
    • Integrated test-related tasks into the existing task management structure.
    • Updated documentation to include details on unit testing tasks and GitHub Actions workflow.
    • Updated version requirement for the Task tool in the README.

@coderabbitai

coderabbitai Bot commented Dec 1, 2024

Copy link
Copy Markdown
Contributor

Walkthrough

This pull request introduces several changes to the project's configuration files, primarily focused on enhancing the CI/CD pipeline and task management. A new GitHub Actions workflow for running unit tests is added, along with structured configurations for build and test tasks. The linting process for YAML files is expanded to include additional files, and references to new task files are integrated into existing configurations. These changes collectively aim to streamline the build and testing processes within the project.

Changes

File Change Summary
.github/workflows/unit-tests.yaml New workflow added for running unit tests on pull requests, pushes, and scheduled events.
build-tasks.yaml New tasks target and clean added for managing build processes with specified dependencies.
lint-tasks.yaml Updated yml task to include additional files for linting; clarified cpp-static-check alias.
taskfile.yaml New inclusions of build-tasks.yaml and test-tasks.yaml under the includes section.
test-tasks.yaml New file defining unit testing tasks and a variable G_TEST_BINARY, with tasks for unit tests.
.github/workflows/code-linting-checks.yaml Modified the lint job to run directly on ubuntu-latest, removing the matrix strategy.
docs/testing.md Updated documentation to include new test tasks and GitHub Actions workflow details.
README.md Updated version requirement for the Task tool from 3.38.0 or higher to 3.40.0 or higher.

Possibly related PRs

Suggested reviewers

  • kirkrodrigues

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 47bcbf2 and 4da8582.

📒 Files selected for processing (1)
  • .github/workflows/unit-tests.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/unit-tests.yaml

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (5)
test-tasks.yaml (2)

12-18: Consider parallelizing build steps

The sequential build steps could be optimized if there are no interdependencies between targets.

Consider using task dependencies instead of sequential commands if the targets can be built independently:

  unit-test:
+   deps:
+     - "build:target-unit-test"
+     - "build:target-executor"
+     - "build:target-worker"
    cmds:
-     - task: "build:target"
-       vars: {TARGET: "unitTest"}
-     - task: "build:target"
-       vars: {TARGET: "spider_task_executor"}
-     - task: "build:target"
-       vars: {TARGET: "worker_test"}
      - "{{.G_TEST_BINARY}} \"~[storage]\""

19-20: Document storage test exclusion rationale

The comment about skipping storage tests should be more descriptive for future maintainers.

-      # Tests tagged with storage requires mysql. Skip them for now.
+      # TODO: Storage-tagged tests require MySQL database setup.
+      # These tests are temporarily excluded from CI to avoid external dependencies.
+      # Consider adding MySQL service container in GitHub Actions for complete testing.
       - "{{.G_TEST_BINARY}} \"~[storage]\""
build-tasks.yaml (1)

19-20: Consider adding build output control

The parallel build command could benefit from configurable job count and output verbosity.

-      - "cmake --build {{.G_BUILD_SPIDER_DIR}} --target {{.TARGET}} --parallel"
+      - "cmake --build {{.G_BUILD_SPIDER_DIR}} --target {{.TARGET}} --parallel {{.JOBS | default \"$(nproc)\"}} {{if eq .VERBOSE \"true\"}}--verbose{{end}}"
.github/workflows/unit-tests.yaml (2)

1-10: LGTM! Consider documenting timezone impact.

The workflow triggers are well-configured. The scheduling at 00:15 UTC is thoughtfully chosen to avoid high-load periods.

Consider adding a comment about the timezone's impact on different regions, as 00:15 UTC might be during working hours in some locations.


19-33: Consider expanding the test matrix.

While using Ubuntu is a good start, consider adding more operating systems to catch platform-specific issues early.

   strategy:
     matrix:
-      os: ["ubuntu-latest"]
+      os: ["ubuntu-latest", "macos-latest", "windows-latest"]
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 8c346c5 and ab005e9.

📒 Files selected for processing (5)
  • .github/workflows/unit-tests.yaml (1 hunks)
  • build-tasks.yaml (1 hunks)
  • lint-tasks.yaml (1 hunks)
  • taskfile.yaml (1 hunks)
  • test-tasks.yaml (1 hunks)
🔇 Additional comments (6)
test-tasks.yaml (1)

6-7: Verify G_BUILD_SPIDER_DIR variable availability

The G_TEST_BINARY path depends on G_BUILD_SPIDER_DIR. Let's verify this variable is properly defined.

✅ Verification successful

G_BUILD_SPIDER_DIR variable is properly defined and used

The variable G_BUILD_SPIDER_DIR is correctly defined in taskfile.yaml as {{.G_BUILD_DIR}}/spider, where G_BUILD_DIR is also properly defined as {{.ROOT_DIR}}/build. The variable is consistently used across the build system configuration files, including the test binary path definition.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if G_BUILD_SPIDER_DIR is defined in other task files
rg -l "G_BUILD_SPIDER_DIR" --type yaml

Length of output: 85


Script:

#!/bin/bash
# Check the definition and usage of G_BUILD_SPIDER_DIR in the found files
rg "G_BUILD_SPIDER_DIR" --type yaml -C 2

Length of output: 1240

build-tasks.yaml (1)

10-17: LGTM! Comprehensive target enumeration

The target list properly includes all necessary components for unit testing.

taskfile.yaml (1)

6-6: LGTM! Proper test tasks integration

The test tasks inclusion is correctly positioned and maintains consistent structure with other includes.

.github/workflows/unit-tests.yaml (2)

11-18: LGTM! Security-conscious configuration.

The empty permissions block follows the principle of least privilege, and the concurrency settings efficiently manage resources by cancelling redundant runs.


48-53: Verify timeout duration and test exclusions.

The 10-minute timeout might be insufficient for complex dependency trees. Also, ensure that the test:unit-test task properly excludes MySQL-dependent tests as mentioned in the PR objectives.

✅ Verification successful

10-minute timeout is sufficient, and MySQL tests are properly excluded

The verification shows that:

  • The dependency installation task (deps:lib_install) only runs platform-specific shell scripts, which typically complete quickly
  • The unit test configuration explicitly excludes MySQL-dependent tests with the pattern ~[storage]
  • The test execution is properly configured to skip storage-tagged tests that require MySQL
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check test task configuration for MySQL test exclusions

# Check test task configuration
fd -t f -e yaml "test.*\.ya?ml" | xargs cat | grep -A 5 "unit-test:"

# Look for MySQL-related test files
fd -t f "test.*\.py" | xargs grep -l "mysql"

Length of output: 278


Script:

#!/bin/bash
# Check Taskfile.yml for test configurations
cat Taskfile.yml | grep -A 10 "test:unit-test:"

# Look for test configuration files
fd -t f "Taskfile.ya?ml"

# Check for MySQL-related test files with more generic pattern
rg -l "mysql|MySQL" -g "test_*.py"

Length of output: 305


Script:

#!/bin/bash
# Look for task definition files in any location
fd -t f "task.*\.(yaml|yml)"

# Search for MySQL-related test files without filename pattern restriction
rg -l "mysql|MySQL" -t py

# Check the workflow file directly for task definitions
cat .github/workflows/unit-tests.yaml

Length of output: 1474


Script:

#!/bin/bash
# Check test task definitions
cat test-tasks.yaml

# Check dependency installation task
cat dep-tasks.yaml

# Look for Python test files
fd -t f -e py -e pytest "test"

Length of output: 1030

lint-tasks.yaml (1)

120-121: LGTM! Verify file existence.

The addition of test-tasks.yaml and build-tasks.yaml to the linting scope is appropriate. Let's verify these files exist in the repository.

✅ Verification successful

Files confirmed: YAML linting scope expansion is valid

The files test-tasks.yaml and build-tasks.yaml exist in the repository, confirming that the addition of these files to the YAML linting scope is appropriate and functional.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify existence of newly added YAML files

# Check if files exist
for file in test-tasks.yaml build-tasks.yaml; do
  if [ ! -f "$file" ]; then
    echo "Missing file: $file"
    exit 1
  fi
done

Length of output: 160


Script:

#!/bin/bash
# Let's try using fd to find these YAML files as they might be in a different directory
fd -e yaml -e yml "test-tasks|build-tasks"

Length of output: 77

Comment thread .github/workflows/unit-tests.yaml Outdated
Comment on lines +37 to +40
- if: "matrix.os == 'macos-latest'"
name: "Install coreutils (for md5sum)"
run: "brew install coreutils"

@coderabbitai coderabbitai Bot Dec 1, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove or enable macOS-specific step.

There's a macOS-specific step for installing coreutils, but macOS isn't included in the OS matrix. Either remove this step or add macOS to the matrix as suggested above.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rabbit is correct.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kirkrodrigues, glad I could help!

Comment thread lint-tasks.yaml Outdated
Comment thread test-tasks.yaml Outdated
Comment thread build-tasks.yaml Outdated
Comment thread build-tasks.yaml Outdated
Comment thread build-tasks.yaml Outdated
Comment thread .github/workflows/unit-tests.yaml Outdated
Comment on lines +37 to +40
- if: "matrix.os == 'macos-latest'"
name: "Install coreutils (for md5sum)"
run: "brew install coreutils"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rabbit is correct.

Comment thread .github/workflows/unit-tests.yaml Outdated
Comment thread .github/workflows/unit-tests.yaml Outdated
Comment thread test-tasks.yaml Outdated
Comment thread test-tasks.yaml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (3)
test-tasks.yaml (2)

3-4: Consider making the test binary path more configurable

The test binary path is hardcoded to a specific location. Consider making this more flexible by allowing override through environment variables.

 vars:
-  G_TEST_BINARY: "{{.G_BUILD_SPIDER_DIR}}/tests/unitTest"
+  G_TEST_BINARY: '{{default "tests/unitTest" .TEST_BINARY_PATH | printf "%s/%s" .G_BUILD_SPIDER_DIR}}'

7-11: Test organization looks good, but documentation is missing

The test tasks are well-organized into non-storage, storage, and all categories as requested in previous reviews. However, we should document these tasks.

Consider adding task descriptions:

 tasks:
   non-storage-unit-tests:
+    desc: "Run all unit tests except storage-related ones"
     deps:
       - "build-unit-test"
     cmds:
       - "{{.G_TEST_BINARY}} \"~[storage]\""

   storage-unit-tests:
+    desc: "Run only storage-related unit tests (requires MySQL setup)"
     deps:
       - "build-unit-test"
     cmds:
       - "{{.G_TEST_BINARY}} \"[storage]\""

   all:
+    desc: "Run all unit tests including storage tests (requires MySQL setup)"
     deps:
       - "build-unit-test"
     cmds:
       - "{{.G_TEST_BINARY}}"

Also applies to: 13-17, 19-23

.github/workflows/code-linting-checks.yaml (1)

Line range hint 21-47: Consider adding timeout for the linting step

While the dependency installation has a timeout, the actual linting step doesn't. This could potentially lead to hung jobs.

       - name: "Install project dependencies "
         timeout-minutes: 10
         run: "task deps:lib_install"

-      - run: "task lint:check"
+      - name: "Run linting checks"
+        timeout-minutes: 5
+        run: "task lint:check"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between ab005e9 and 6456a89.

📒 Files selected for processing (6)
  • .github/workflows/code-linting-checks.yaml (1 hunks)
  • .github/workflows/unit-tests.yaml (1 hunks)
  • build-tasks.yaml (1 hunks)
  • lint-tasks.yaml (1 hunks)
  • taskfile.yaml (1 hunks)
  • test-tasks.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • taskfile.yaml
  • build-tasks.yaml
  • lint-tasks.yaml
  • .github/workflows/unit-tests.yaml
🔇 Additional comments (2)
test-tasks.yaml (1)

25-29: Verify build dependencies completeness

The build task looks well-structured, but let's verify if all required targets are included.

✅ Verification successful

Build dependencies are correctly specified

Based on the CMake configuration files, the build task's dependencies are complete and accurate. The specified targets in the YAML file ("spider_task_executor", "unitTest", "worker_test") align perfectly with the test-related targets found in the CMake configuration:

  • "unitTest" is the main test executable
  • "worker_test" is a shared library for worker testing
  • "spider_task_executor" appears to be a core component
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any additional test-related targets in CMakeLists.txt files
fd -e txt -e cmake CMakeLists | xargs rg -i "add_test|enable_testing"

Length of output: 71


Script:

#!/bin/bash
# Let's try a different approach to find test-related targets
# First, let's look for test-related targets in CMake files
fd CMakeLists.txt | xargs rg -i "test" -A 2

# Also search for any test-related targets in build configuration
fd -e yaml -e yml | xargs rg -i "test.*target"

Length of output: 1733

.github/workflows/code-linting-checks.yaml (1)

21-21: Workflow simplification looks good

The change to use only ubuntu-latest is a good simplification, as it reduces complexity while maintaining functionality. This aligns well with the PR's objective of streamlining the CI process.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (3)
docs/testing.md (3)

46-47: Add taskfile location reference.

Consider adding the location of the taskfile (e.g., ./taskfile.yaml) to help developers locate the configuration more easily.


48-53: Improve sentence variety in the documentation.

Consider rewording to avoid repetitive sentence beginnings:

-* `test:non-storage-unit-tests` runs all unit tests without `[storage]` tag, i.e. do not need a storage to run.
-* `test:storage-unit-tests` runs all unit tests that has `[storage]` tag.
-* `test:all` runs all unit tests.
-
-All unit-test related tasks build `spider_task_executor`, `unitTest` and `worker_test`, which are necessary to run unit
-tests.
+* `test:non-storage-unit-tests`: Executes all unit tests without the `[storage]` tag (no storage required)
+* `test:storage-unit-tests`: Handles all unit tests tagged with `[storage]`
+* `test:all`: Executes the complete test suite
+
+These tasks automatically build the required components: `spider_task_executor`, `unitTest`, and `worker_test`.
🧰 Tools
🪛 LanguageTool

[style] ~50-~50: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... that has [storage] tag. * test:all runs all unit tests. All unit-test related ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


57-58: Enhance workflow documentation with additional details.

Consider expanding this section with:

  • Specific trigger conditions (which branches/events trigger the workflow)
  • The exact schedule timing for daily runs
  • Future plans or requirements for incorporating storage tests

Example addition:

+The workflow triggers on:
+- Push events to main branch
+- Pull requests targeting main branch
+- Daily at [specific time] UTC
+
+Note: Integration of storage-dependent tests is planned for future iterations, pending containerized MySQL setup.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 6456a89 and 28019b3.

📒 Files selected for processing (1)
  • docs/testing.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/testing.md

[style] ~50-~50: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... that has [storage] tag. * test:all runs all unit tests. All unit-test related ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🔇 Additional comments (1)
docs/testing.md (1)

42-42: No issues with the code block closure.

Comment thread build-tasks.yaml Outdated
Comment thread build-tasks.yaml Outdated
Comment thread build-tasks.yaml Outdated
Comment thread test-tasks.yaml Outdated
Comment thread docs/testing.md Outdated
Comment on lines +44 to +58
## Test tasks

Three unit-test related tasks are added to taskfile.

* `test:non-storage-unit-tests` runs all unit tests without `[storage]` tag, i.e. do not need a storage to run.
* `test:storage-unit-tests` runs all unit tests that has `[storage]` tag.
* `test:all` runs all unit tests.

All unit-test related tasks build `spider_task_executor`, `unitTest` and `worker_test`, which are necessary to run unit
tests.

## GitHub test workflow

A GitHub workflow `unit_tests.yaml` is set up to run unit test on push, pull request and every day. Currently, it only
runs unit tests without storage requirement. No newline at end of file

@kirkrodrigues kirkrodrigues Dec 6, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we replace from "Build and run unit tests" with the following?

## Running tests

You can use the following tasks to run the set of unit tests that's appropriate.

| Task                          | Description                                                       |
|-------------------------------|-------------------------------------------------------------------|
| `test:all`                    | Runs all unit tests.                                              |
| `test:non-storage-unit-tests` | Runs all unit tests which don't require a storage backend to run. |
| `test:storage-unit-tests`     | Runs all unit tests which require a storage backend to run.       |

## GitHub unit test workflow

The [unit_tests.yaml][gh-workflow-unit-tests] GitHub workflow runs the unit tests on push,
pull requests, and daily. Currently, it only runs unit tests that don't require a storage backend.

If any tests show error messages for the connection function below, revisit
[setup section](#set-up-mysql-as-storage-backend) and verify that `cStorageUrl` was set correctly.

And leave the storage->connect function after the snippet above.

And add a reference:

[gh-workflow-unit-tests]: ../.github/workflows/unit-tests.yaml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, made some typos that I just edited now.

sitaowang1998 and others added 6 commits December 6, 2024 12:37
Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com>
Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com>
Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com>
Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
docs/testing.md (2)

36-41: Consider enhancing error handling documentation

While the current instructions are helpful, consider adding:

  • Common error messages that users might encounter
  • Specific troubleshooting steps for each error scenario

Example addition:

+ Common errors:
+ - "Connection refused": Verify MySQL service is running
+ - "Access denied": Check user permissions and password
+ - "Unknown database": Ensure database name matches setup

43-48: Add information about manual workflow triggers

The workflow documentation accurately describes automated triggers, but consider adding information about manual workflow execution using the workflow_dispatch event.

 The [unit_tests.yaml][gh-workflow-unit-tests] GitHub workflow runs the unit tests on push,
-pull requests, and daily. Currently, it only runs unit tests that don't require a storage backend.
+pull requests, and daily. The workflow can also be triggered manually from the GitHub Actions tab.
+Currently, it only runs unit tests that don't require a storage backend.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 6e19d7b and 47bcbf2.

📒 Files selected for processing (3)
  • build-tasks.yaml (1 hunks)
  • docs/testing.md (1 hunks)
  • test-tasks.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • build-tasks.yaml
  • test-tasks.yaml
🔇 Additional comments (1)
docs/testing.md (1)

30-34: Well-structured task documentation!

The table clearly outlines the available test tasks and their purposes, making it easy for developers to choose the appropriate testing command.

Comment thread .github/workflows/unit-tests.yaml Outdated
Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com>

@kirkrodrigues kirkrodrigues left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the PR title, how about:

ci: Add tasks to run unit tests and GitHub workflow to run non-storage unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants