Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions .github/workflows/code-linting-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ concurrency:

jobs:
lint:
strategy:
matrix:
os: ["ubuntu-latest"]
runs-on: "${{matrix.os}}"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
with:
Expand All @@ -34,10 +31,6 @@ jobs:
- name: "Install task"
run: "npm install -g @go-task/cli"

- if: "matrix.os == 'macos-latest'"
name: "Install coreutils (for md5sum)"
run: "brew install coreutils"

- name: "Log tool versions"
run: |-
md5sum --version
Expand All @@ -47,7 +40,6 @@ jobs:

- name: "Install project dependencies "
timeout-minutes: 10
continue-on-error: false
run: "task deps:lib_install"

- run: "task lint:check"
45 changes: 45 additions & 0 deletions .github/workflows/unit-tests.yaml
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:
lint:
Comment thread
sitaowang1998 marked this conversation as resolved.
Resolved
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"
20 changes: 20 additions & 0 deletions build-tasks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: "3"

tasks:
target:
internal: true
vars:
TARGETS: "{{.TARGETS}}"
requires:
vars:
- name: "TARGETS"
Comment thread
sitaowang1998 marked this conversation as resolved.
Resolved
deps: [":config-cmake-project"]
cmds:
- "cmake --build {{.G_BUILD_SPIDER_DIR}} --parallel
--target {{trimPrefix \"[\" .TARGETS | trimSuffix \"]\"}}"

clean:
internal: true
deps: ["::config-cmake-project"]
Comment thread
sitaowang1998 marked this conversation as resolved.
Resolved
cmds:
- "cmake --build {{.G_BUILD_SPIDER_DIR}} --target clean --parallel"
Comment thread
kirkrodrigues marked this conversation as resolved.
Resolved
6 changes: 4 additions & 2 deletions lint-tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ tasks:
--strict \
.gersemirc \
.github/ \
lint-tasks.yaml \
build-tasks.yaml \
dep-tasks.yaml \
taskfile.yaml
lint-tasks.yaml \
taskfile.yaml \
test-tasks.yaml

clang-format:
internal: true
Expand Down
4 changes: 3 additions & 1 deletion taskfile.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
version: "3"

includes:
lint: "lint-tasks.yaml"
deps: "dep-tasks.yaml"
build: "build-tasks.yaml"
lint: "lint-tasks.yaml"
test: "test-tasks.yaml"
utils: "tools/yscope-dev-utils/taskfiles/utils.yml"

vars:
Expand Down
29 changes: 29 additions & 0 deletions test-tasks.yaml
Comment thread
kirkrodrigues marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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"]}
Comment thread
sitaowang1998 marked this conversation as resolved.
Resolved