From 4f593455506b2f28a72eeb71eb3101532cf0ebd4 Mon Sep 17 00:00:00 2001 From: Dinu Blanovschi Date: Tue, 6 Feb 2024 14:50:44 +0100 Subject: [PATCH] chore: try rerun dirty tests action --- .../workflows/rerun-dirty-tests-index.yaml | 26 +++++++++++++++++++ .../cargo-difftests-sample-project/.gitignore | 1 - .../index_root/test_add | 1 + .../index_root/test_div | 1 + .../index_root/test_div_2 | 1 + .../index_root/test_mul | 1 + .../index_root/test_sub | 1 + 7 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/rerun-dirty-tests-index.yaml create mode 100644 sample/cargo-difftests-sample-project/index_root/test_add create mode 100644 sample/cargo-difftests-sample-project/index_root/test_div create mode 100644 sample/cargo-difftests-sample-project/index_root/test_div_2 create mode 100644 sample/cargo-difftests-sample-project/index_root/test_mul create mode 100644 sample/cargo-difftests-sample-project/index_root/test_sub diff --git a/.github/workflows/rerun-dirty-tests-index.yaml b/.github/workflows/rerun-dirty-tests-index.yaml new file mode 100644 index 0000000..4d3b79a --- /dev/null +++ b/.github/workflows/rerun-dirty-tests-index.yaml @@ -0,0 +1,26 @@ +on: + push: + branches: + - trunk + pull_request: + branches: + - trunk + +jobs: + rerun-dirty-tests-test: + runs-on: ubuntu-latest + steps: + - name: Set old commit (push) + if: ${{ github.event.before != null }} + run: echo "OLD_COMMIT=${{ github.event.before }}" >> $GITHUB_ENV + - name: Set old commit (pull_request) + if: ${{ github.event.pull_request.base.sha != null }} + run: echo "OLD_COMMIT=${{ github.event.pull_request.base.sha }}" >> $GITHUB_ENV + + - name: Print old commit + run: echo ${{ github.env.OLD_COMMIT }} + + - uses: dnbln/cargo-difftests-rerun-dirty-action@2619b6ff4cc3aee7a7d9812dca49022a3eeb17af + with: + commit-to-diff-with: ${{ github.env.OLD_COMMIT }} + index-root: sample/cargo-difftests-sample-project/index_root diff --git a/sample/cargo-difftests-sample-project/.gitignore b/sample/cargo-difftests-sample-project/.gitignore index 013ecb3..ea8c4bf 100644 --- a/sample/cargo-difftests-sample-project/.gitignore +++ b/sample/cargo-difftests-sample-project/.gitignore @@ -1,2 +1 @@ /target -/index_root diff --git a/sample/cargo-difftests-sample-project/index_root/test_add b/sample/cargo-difftests-sample-project/index_root/test_add new file mode 100644 index 0000000..fe6e5b0 --- /dev/null +++ b/sample/cargo-difftests-sample-project/index_root/test_add @@ -0,0 +1 @@ +{"files":["sample/cargo-difftests-sample-project/tests/tests.rs","cargo-difftests-testclient/src/compile_index_and_clean_config.rs","cargo-difftests-testclient/src/lib.rs","cargo-difftests-testclient/src/groups.rs","sample/cargo-difftests-sample-project/src/lib.rs"],"test_run":"2024-02-06T11:28:55.727104100Z","test_desc":[{"bin_path":"","extra":{"bin_name":null,"crate_name":"tests","pkg_name":"cargo-difftests-sample-project","test_name":"test_add"}}]} \ No newline at end of file diff --git a/sample/cargo-difftests-sample-project/index_root/test_div b/sample/cargo-difftests-sample-project/index_root/test_div new file mode 100644 index 0000000..acb007f --- /dev/null +++ b/sample/cargo-difftests-sample-project/index_root/test_div @@ -0,0 +1 @@ +{"files":["sample/cargo-difftests-sample-project/tests/tests.rs","cargo-difftests-testclient/src/compile_index_and_clean_config.rs","cargo-difftests-testclient/src/lib.rs","cargo-difftests-testclient/src/groups.rs","sample/cargo-difftests-sample-project/src/advanced_arithmetic.rs"],"test_run":"2024-02-06T11:28:57.156589800Z","test_desc":[{"bin_path":"","extra":{"bin_name":null,"crate_name":"tests","pkg_name":"cargo-difftests-sample-project","test_name":"test_div"}}]} \ No newline at end of file diff --git a/sample/cargo-difftests-sample-project/index_root/test_div_2 b/sample/cargo-difftests-sample-project/index_root/test_div_2 new file mode 100644 index 0000000..a95ca12 --- /dev/null +++ b/sample/cargo-difftests-sample-project/index_root/test_div_2 @@ -0,0 +1 @@ +{"files":["sample/cargo-difftests-sample-project/tests/tests.rs","cargo-difftests-testclient/src/compile_index_and_clean_config.rs","cargo-difftests-testclient/src/lib.rs","cargo-difftests-testclient/src/groups.rs","sample/cargo-difftests-sample-project/src/advanced_arithmetic.rs"],"test_run":"2024-02-06T11:28:58.505361600Z","test_desc":[{"bin_path":"","extra":{"bin_name":null,"crate_name":"tests","pkg_name":"cargo-difftests-sample-project","test_name":"test_div_2"}}]} \ No newline at end of file diff --git a/sample/cargo-difftests-sample-project/index_root/test_mul b/sample/cargo-difftests-sample-project/index_root/test_mul new file mode 100644 index 0000000..ec56c63 --- /dev/null +++ b/sample/cargo-difftests-sample-project/index_root/test_mul @@ -0,0 +1 @@ +{"files":["sample/cargo-difftests-sample-project/tests/tests.rs","cargo-difftests-testclient/src/compile_index_and_clean_config.rs","cargo-difftests-testclient/src/lib.rs","cargo-difftests-testclient/src/groups.rs","sample/cargo-difftests-sample-project/src/advanced_arithmetic.rs"],"test_run":"2024-02-06T11:28:59.432625600Z","test_desc":[{"bin_path":"","extra":{"bin_name":null,"crate_name":"tests","pkg_name":"cargo-difftests-sample-project","test_name":"test_mul"}}]} \ No newline at end of file diff --git a/sample/cargo-difftests-sample-project/index_root/test_sub b/sample/cargo-difftests-sample-project/index_root/test_sub new file mode 100644 index 0000000..dd310da --- /dev/null +++ b/sample/cargo-difftests-sample-project/index_root/test_sub @@ -0,0 +1 @@ +{"files":["sample/cargo-difftests-sample-project/tests/tests.rs","cargo-difftests-testclient/src/compile_index_and_clean_config.rs","cargo-difftests-testclient/src/lib.rs","cargo-difftests-testclient/src/groups.rs","sample/cargo-difftests-sample-project/src/lib.rs"],"test_run":"2024-02-06T11:29:00.393606500Z","test_desc":[{"bin_path":"","extra":{"bin_name":null,"crate_name":"tests","pkg_name":"cargo-difftests-sample-project","test_name":"test_sub"}}]} \ No newline at end of file