-
Notifications
You must be signed in to change notification settings - Fork 12
ci: Add tasks to run unit tests and GitHub workflow to run non-storage unit tests. #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
f07a767
Add test task
sitaowang1998 0d75528
Add unit test github workflow
sitaowang1998 783b950
Rename github workflow for unit tests
sitaowang1998 cb1695e
Create a separate build taskfile and fix build dependencies for unit …
sitaowang1998 ab005e9
Serialize the build for unit test targets
sitaowang1998 31e43a1
Sort yml lint inputs alphabetically
sitaowang1998 24d020f
Move build include to root task file
sitaowang1998 4616e10
Build task accepts a list of targets
sitaowang1998 8cd345b
Separate test tasks
sitaowang1998 6456a89
Remove unnecessary matrix and macOS setup. Remove unnecessary default…
sitaowang1998 28019b3
Add test task and github workflow to testing doc
sitaowang1998 6e19d7b
Add numCPU to cmake build and bump task version in doc
sitaowang1998 229eed3
Fix double semicolumn in task name
sitaowang1998 2d2e4f5
Add default target "all" for build task
sitaowang1998 fba9166
Use list argument for build task
sitaowang1998 0ef39ad
style: Update build task for tests
sitaowang1998 538a03c
docs: Update testing docs
sitaowang1998 a7f403a
style: Fix line wrap width in testing doc
sitaowang1998 47bcbf2
Edit testing docs.
kirkrodrigues 4da8582
Fix: Change the job name of unit test workflow
sitaowang1998 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| name: "unit-tests" | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| schedule: | ||
| # Run daily at 00:15 UTC (the 15 is to avoid periods of high load) | ||
| - cron: "15 0 * * *" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: {} | ||
|
|
||
| concurrency: | ||
| group: "${{github.workflow}}-${{github.ref}}" | ||
|
|
||
| # Cancel in-progress jobs for efficiency | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| non-storage-unit-tests: | ||
| runs-on: "ubuntu-latest" | ||
| steps: | ||
| - uses: "actions/checkout@v4" | ||
| with: | ||
| submodules: "recursive" | ||
|
|
||
| - uses: "actions/setup-python@v5" | ||
| with: | ||
| python-version: "3.10" | ||
|
|
||
| - name: "Install task" | ||
| run: "npm install -g @go-task/cli" | ||
|
|
||
| - name: "Log tool versions" | ||
| run: |- | ||
| md5sum --version | ||
| python --version | ||
| tar --version | ||
| task --version | ||
|
|
||
| - name: "Install project dependencies " | ||
| timeout-minutes: 10 | ||
| run: "task deps:lib_install" | ||
|
|
||
| - run: "task test:non-storage-unit-tests" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| version: "3" | ||
|
|
||
| tasks: | ||
| target: | ||
| internal: true | ||
| vars: | ||
| TARGETS: | ||
| ref: "default (list \"all\") .TARGETS" | ||
| deps: [":config-cmake-project"] | ||
| cmds: | ||
| - >- | ||
| cmake | ||
| --build "{{.G_BUILD_SPIDER_DIR}}" | ||
| --parallel {{numCPU}} | ||
| --target {{range .TARGETS}}{{.}} {{end}} | ||
|
|
||
| clean: | ||
| internal: true | ||
| deps: [":config-cmake-project"] | ||
| cmds: | ||
| - "cmake --build {{.G_BUILD_SPIDER_DIR}} --target clean --parallel {{numCPU}}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| version: "3" | ||
|
|
||
| vars: | ||
| G_TEST_BINARY: "{{.G_BUILD_SPIDER_DIR}}/tests/unitTest" | ||
|
|
||
| tasks: | ||
| non-storage-unit-tests: | ||
| deps: | ||
| - "build-unit-test" | ||
| cmds: | ||
| - "{{.G_TEST_BINARY}} \"~[storage]\"" | ||
|
|
||
| storage-unit-tests: | ||
| deps: | ||
| - "build-unit-test" | ||
| cmds: | ||
| - "{{.G_TEST_BINARY}} \"[storage]\"" | ||
|
|
||
| all: | ||
| deps: | ||
| - "build-unit-test" | ||
| cmds: | ||
| - "{{.G_TEST_BINARY}}" | ||
|
|
||
| build-unit-test: | ||
| internal: true | ||
| deps: | ||
| - task: ":build:target" | ||
| vars: | ||
| TARGETS: ["spider_task_executor", "unitTest", "worker_test"] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.