-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(repo): run native tests on pr in taskdb dir (#433)
* feat(repo): run native tests on pr in taskdb dir * test * include changes
- Loading branch information
1 parent
bbe246b
commit 9ed4ac2
Showing
3 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 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 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 |
---|---|---|
@@ -1,18 +1,48 @@ | ||
name: CI - Native | ||
|
||
on: workflow_call | ||
on: | ||
workflow_call: | ||
pull_request: | ||
paths: | ||
- "taskdb/**" | ||
|
||
jobs: | ||
set-taskdb: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
taskdb: ${{ steps.check_file.outputs.taskdb }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Check if specific file changed | ||
id: check_file | ||
run: | | ||
BASE_BRANCH=${{ github.event.pull_request.base.ref }} | ||
if git diff --name-only origin/$BASE_BRANCH ${{ github.sha }} | grep -q "taskdb/src/redis_db.rs"; then | ||
echo "redis changed" | ||
echo "::set-output name=taskdb::raiko-tasks/redis-db" | ||
else | ||
echo "redis unchanged" | ||
echo "::set-output name=taskdb::" | ||
fi | ||
build-test-native: | ||
name: Build and test native | ||
needs: set-taskdb | ||
uses: ./.github/workflows/ci-build-test-reusable.yml | ||
with: | ||
version_name: "native" | ||
version_toolchain: "nightly-2024-04-17" | ||
taskdb: ${{ needs.set-taskdb.outputs.taskdb }} | ||
|
||
integration-test-native: | ||
name: Run integration tests on native | ||
needs: set-taskdb | ||
uses: ./.github/workflows/ci-integration-reusable.yml | ||
with: | ||
version_name: "native" | ||
version_toolchain: "nightly-2024-04-17" | ||
taskdb: ${{ needs.set-taskdb.outputs.taskdb }} |