From 3f9326dc5142ad71115e5601460140d5687694b0 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds Date: Thu, 22 Sep 2022 13:46:16 +0300 Subject: [PATCH 01/41] Changed yaml files --- .github/workflows/ci.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c530e94..8c92d81 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,20 +1,32 @@ name: Java CI - on: [push] - jobs: build: runs-on: ubuntu-latest - steps: + - uses: actions/setup-python@v2 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pandas + pip install numpy + - run: sudo apt update + - run: sudo apt install inotify-tools + - run: inotifywait -mr /home/runner/work --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/test.csv & echo 'basak' + - run: touch starting_build_actionscheckout@v3_10 - uses: actions/checkout@v3 + - run: touch starting_build_SetupJDK18_11 - name: Set up JDK 18 uses: actions/setup-java@v3 with: java-version: '18' distribution: 'adopt' + - run: touch starting_build_TestwithMaven_16 - name: Test with Maven run: mvn clean test jacoco:report + - run: touch starting_build_Codecov_18 - name: Codecov uses: codecov/codecov-action@v3.1.0 with: From 3bbefeeca01cfa505ffa66a0173ebad5f18f936b Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:06:25 +0300 Subject: [PATCH 02/41] Update ci.yml --- .github/workflows/ci.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c92d81..d1dd06a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,8 +26,14 @@ jobs: - run: touch starting_build_TestwithMaven_16 - name: Test with Maven run: mvn clean test jacoco:report - - run: touch starting_build_Codecov_18 - - name: Codecov - uses: codecov/codecov-action@v3.1.0 + - run: pwd + - run: ls + - name: Pushes to another repository + id: push_directory + uses: cpina/github-action-push-to-another-repository@main + env: + API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} with: - token: ${{ secrets.CODECOV_TOKEN }} + source-directory: /home/runner/test.csv + destination-github-username: 'optimizing-ci-builds' + destination-repository-name: 'optimizing-ci-builds' From 140f26ff688297dd20ef86ae0e27951c270d0895 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:14:22 +0300 Subject: [PATCH 03/41] Update ci.yml --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1dd06a..1a0068c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: pip install numpy - run: sudo apt update - run: sudo apt install inotify-tools - - run: inotifywait -mr /home/runner/work --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/test.csv & echo 'basak' + - run: inotifywait -mr /home/runner/work --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/test/test.csv & echo 'basak' - run: touch starting_build_actionscheckout@v3_10 - uses: actions/checkout@v3 - run: touch starting_build_SetupJDK18_11 @@ -26,6 +26,7 @@ jobs: - run: touch starting_build_TestwithMaven_16 - name: Test with Maven run: mvn clean test jacoco:report + - run: cd /home/runner - run: pwd - run: ls - name: Pushes to another repository @@ -34,6 +35,6 @@ jobs: env: API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} with: - source-directory: /home/runner/test.csv + source-directory: 'test' destination-github-username: 'optimizing-ci-builds' destination-repository-name: 'optimizing-ci-builds' From dbb98831c39d1586e35b0af7d1e3461a9c93020b Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:16:32 +0300 Subject: [PATCH 04/41] Update ci.yml --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a0068c..4a54b4f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,9 @@ jobs: - run: touch starting_build_TestwithMaven_16 - name: Test with Maven run: mvn clean test jacoco:report - - run: cd /home/runner + - run: cd .. + - run: cd .. + - run: cd .. - run: pwd - run: ls - name: Pushes to another repository From fdc00842fae846f960b46b716533dea22b483bd6 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:22:29 +0300 Subject: [PATCH 05/41] Update ci.yml --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a54b4f..76dbb0a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,9 +26,7 @@ jobs: - run: touch starting_build_TestwithMaven_16 - name: Test with Maven run: mvn clean test jacoco:report - - run: cd .. - - run: cd .. - - run: cd .. + - run: find /home/runner/test - run: pwd - run: ls - name: Pushes to another repository @@ -37,6 +35,6 @@ jobs: env: API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} with: - source-directory: 'test' + source-directory: '/home/runner/test' destination-github-username: 'optimizing-ci-builds' destination-repository-name: 'optimizing-ci-builds' From 5bf820b411555653c2af9b8f218044a9d30f1e11 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:25:16 +0300 Subject: [PATCH 06/41] Update ci.yml --- .github/workflows/ci.yml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76dbb0a..7e1e41b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,29 +4,12 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/setup-python@v2 - with: - python-version: '3.10' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pandas - pip install numpy - run: sudo apt update - run: sudo apt install inotify-tools - run: inotifywait -mr /home/runner/work --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/test/test.csv & echo 'basak' - run: touch starting_build_actionscheckout@v3_10 - uses: actions/checkout@v3 - - run: touch starting_build_SetupJDK18_11 - - name: Set up JDK 18 - uses: actions/setup-java@v3 - with: - java-version: '18' - distribution: 'adopt' - - run: touch starting_build_TestwithMaven_16 - - name: Test with Maven - run: mvn clean test jacoco:report - - run: find /home/runner/test + - run: find home/runner/test - run: pwd - run: ls - name: Pushes to another repository From b6cedd7fd3fbe1b56707f2ecf60d81f516c6eb73 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:30:08 +0300 Subject: [PATCH 07/41] Update ci.yml --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e1e41b..128c068 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,9 @@ jobs: - run: inotifywait -mr /home/runner/work --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/test/test.csv & echo 'basak' - run: touch starting_build_actionscheckout@v3_10 - uses: actions/checkout@v3 - - run: find home/runner/test + - run: pwd + - run: ls + - run: cd src - run: pwd - run: ls - name: Pushes to another repository From 897dbb3aae124861710d522cf1df832ef45058d1 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:33:40 +0300 Subject: [PATCH 08/41] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 128c068..58e3324 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v3 - run: pwd - run: ls - - run: cd src + - run: cd /target - run: pwd - run: ls - name: Pushes to another repository From 1af2c7f2141ea99566e407605a0381efa92801a8 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:35:24 +0300 Subject: [PATCH 09/41] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58e3324..1ad6fb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v3 - run: pwd - run: ls - - run: cd /target + - run: cd / - run: pwd - run: ls - name: Pushes to another repository From 3a21bad45c9fdd1664e487dc048ea0834e562de7 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:36:23 +0300 Subject: [PATCH 10/41] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ad6fb4..71c2e81 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v3 - run: pwd - run: ls - - run: cd / + - run: cd ~ - run: pwd - run: ls - name: Pushes to another repository From 7cfa9cf3a1ef5382680fb84e056a9be2e309edcd Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:37:41 +0300 Subject: [PATCH 11/41] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71c2e81..87fd835 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v3 - run: pwd - run: ls - - run: cd ~ + - run: cd - run: pwd - run: ls - name: Pushes to another repository From 513733d5e6c2ffe6e7a168484c395ef1957a0d69 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:37:53 +0300 Subject: [PATCH 12/41] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87fd835..fb01cbf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v3 - run: pwd - run: ls - - run: cd + - run: cd - run: pwd - run: ls - name: Pushes to another repository From b37021d44a902207b4301bcc3c53c199754c30d9 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:43:00 +0300 Subject: [PATCH 13/41] Update ci.yml --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb01cbf..561539f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,22 +4,35 @@ jobs: build: runs-on: ubuntu-latest steps: - - run: sudo apt update - - run: sudo apt install inotify-tools - - run: inotifywait -mr /home/runner/work --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/test/test.csv & echo 'basak' - - run: touch starting_build_actionscheckout@v3_10 - - uses: actions/checkout@v3 - - run: pwd - - run: ls - - run: cd - - run: pwd - - run: ls - - name: Pushes to another repository - id: push_directory - uses: cpina/github-action-push-to-another-repository@main - env: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pandas + pip install numpy + - run: sudo apt update + - run: sudo apt install inotify-tools + - run: inotifywait -mr /home/runner/work --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/test.csv & echo 'basak' + - uses: jannekem/run-python-script-action@v1 + with: + script: | + import pandas as pd + import numpy as np + import os + print(os.getcwd()) + os.chdir("..") + os.chdir("..") + os.chdir("..") + print(os.getcwd()) + - name: Pushes to another repository + id: push_directory + uses: cpina/github-action-push-to-another-repository@main + env: API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} - with: + with: source-directory: '/home/runner/test' destination-github-username: 'optimizing-ci-builds' destination-repository-name: 'optimizing-ci-builds' From 7f0aa823c939bca6b0ff8034a57bcf1ed716d88f Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:45:02 +0300 Subject: [PATCH 14/41] Update ci.yml --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 561539f..b099a58 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,12 +27,14 @@ jobs: os.chdir("..") os.chdir("..") print(os.getcwd()) + - run: pwd + - run: ls - name: Pushes to another repository id: push_directory uses: cpina/github-action-push-to-another-repository@main env: API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} with: - source-directory: '/home/runner/test' + source-directory: 'test' destination-github-username: 'optimizing-ci-builds' destination-repository-name: 'optimizing-ci-builds' From becfbf507491fa0e5ec1e5610a760a62e4a2fba5 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:53:24 +0300 Subject: [PATCH 15/41] Update ci.yml --- .github/workflows/ci.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b099a58..38c40a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,18 +15,14 @@ jobs: pip install numpy - run: sudo apt update - run: sudo apt install inotify-tools - - run: inotifywait -mr /home/runner/work --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/test.csv & echo 'basak' + - run: inotifywait -mr /home/runner/work --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/test/test.csv & echo 'basak' - uses: jannekem/run-python-script-action@v1 with: script: | import pandas as pd import numpy as np import os - print(os.getcwd()) - os.chdir("..") - os.chdir("..") - os.chdir("..") - print(os.getcwd()) + os.rename("/home/runner/test/test.csv", "/home/runner/work/MavenTestCI/MavenTestCI/test/test.csv") - run: pwd - run: ls - name: Pushes to another repository From 446ad1a17886a0685c3ae0d8b65559b611eb7243 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:55:14 +0300 Subject: [PATCH 16/41] Update ci.yml --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38c40a4..0073039 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,7 @@ jobs: import pandas as pd import numpy as np import os + os.mkdir('test') os.rename("/home/runner/test/test.csv", "/home/runner/work/MavenTestCI/MavenTestCI/test/test.csv") - run: pwd - run: ls From ca6888d5901d2115b009bec41dc2a6e519674e8b Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:55:34 +0300 Subject: [PATCH 17/41] Update ci.yml --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0073039..38be72a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,8 +22,7 @@ jobs: import pandas as pd import numpy as np import os - os.mkdir('test') - os.rename("/home/runner/test/test.csv", "/home/runner/work/MavenTestCI/MavenTestCI/test/test.csv") + os.rename("/home/runner/test/test.csv", "/home/runner/work/MavenTestCI/MavenTestCI/test.csv") - run: pwd - run: ls - name: Pushes to another repository From d7f76661a00e9632ed6642626114e6838006164d Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 12:00:01 +0300 Subject: [PATCH 18/41] Update ci.yml --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38be72a..e0cfa02 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,12 @@ jobs: import pandas as pd import numpy as np import os + os.chdir("..") + os.chdir("..") + os.chdir("..") + print(os.getcwd()) + os.chdir("test") + os.listdir() os.rename("/home/runner/test/test.csv", "/home/runner/work/MavenTestCI/MavenTestCI/test.csv") - run: pwd - run: ls From 8d1c6973a9e8276116087c0dbbf159a7cafec0df Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 12:06:35 +0300 Subject: [PATCH 19/41] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0cfa02..eb4c702 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,7 @@ jobs: - run: sudo apt update - run: sudo apt install inotify-tools - run: inotifywait -mr /home/runner/work --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/test/test.csv & echo 'basak' + - run: cat /home/runner/test/test.csv - uses: jannekem/run-python-script-action@v1 with: script: | @@ -26,7 +27,6 @@ jobs: os.chdir("..") os.chdir("..") print(os.getcwd()) - os.chdir("test") os.listdir() os.rename("/home/runner/test/test.csv", "/home/runner/work/MavenTestCI/MavenTestCI/test.csv") - run: pwd From 6b0409ddf824bccf843821d2b12dda1ea09591bb Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 12:09:06 +0300 Subject: [PATCH 20/41] Update ci.yml --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb4c702..9d36d51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,6 @@ jobs: - run: sudo apt update - run: sudo apt install inotify-tools - run: inotifywait -mr /home/runner/work --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/test/test.csv & echo 'basak' - - run: cat /home/runner/test/test.csv - uses: jannekem/run-python-script-action@v1 with: script: | From 7739a103340d00e6c8ef5cd228f175045c26859d Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 12:10:17 +0300 Subject: [PATCH 21/41] Update ci.yml --- .github/workflows/ci.yml | 58 +++++++++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d36d51..1927a09 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,18 +18,56 @@ jobs: - run: inotifywait -mr /home/runner/work --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/test/test.csv & echo 'basak' - uses: jannekem/run-python-script-action@v1 with: - script: | + script: | import pandas as pd import numpy as np - import os - os.chdir("..") - os.chdir("..") - os.chdir("..") - print(os.getcwd()) - os.listdir() - os.rename("/home/runner/test/test.csv", "/home/runner/work/MavenTestCI/MavenTestCI/test.csv") - - run: pwd - - run: ls + df = pd.read_csv(f"/home/runner/test.csv", sep = ';', names=["time", "watched_filename", "event_filename", "event_name"]) + df['event_filename'] = df['event_filename'].replace(np.nan, '') + steps = {} + starting_indexes = df[(df["event_filename"].str.contains("starting_")) & (df["event_name"] == "CREATE")].index.to_list() + [df.shape[0]] + ending_indexes = [0] + df[(df["event_filename"].str.contains("starting_")) & (df["event_name"] == "CLOSE_WRITE,CLOSE")].index.to_list() + starting_df = df[df["event_filename"].str.contains("starting_")] + touch_file_names = ["setup"] + [x.replace("starting_", "") for x in starting_df["event_filename"].value_counts().index.to_list()] + for starting_index, ending_index, touch_file_name in zip(starting_indexes, ending_indexes, touch_file_names): + steps[touch_file_name] = (ending_index, starting_index) + df["watched_filename"] = df["watched_filename"] + df["event_filename"] + df.drop("event_filename", axis=1, inplace=True) + df.rename(columns={'watched_filename':'file_name'}, inplace=True) + modify_df = df[df["event_name"] == "MODIFY"] + file_names = modify_df["file_name"].value_counts().index.to_list() + info = [] + for file_name in file_names: + last_access_step = "" + last_modify_step = "" + creation_step = "" + if df[(df["file_name"] == file_name) & (df["event_name"] == "MODIFY")].shape[0] == 0: continue + last_modify_index = df[(df["file_name"] == file_name) & (df["event_name"] == "MODIFY")].index.to_list()[-1] + last_access_index = 0 + if df[(df["file_name"] == file_name) & (df["event_name"] == "ACCESS")].shape[0] > 0: + last_access_index = df[(df["file_name"] == file_name) & (df["event_name"] == "ACCESS")].index.to_list()[-1] + else: + last_access_index = -1 + last_access_step = "Not provided" + if last_access_index < last_modify_index: + try: + creation_index = df[(df["file_name"] == file_name) & (df["event_name"] == "CREATE")].index.to_list()[0] + except: + creation_index = -1 + creation_step = "Not provided" + for touch_file_name, (starting_index, ending_index) in steps.items(): + if (last_access_index > starting_index) & (last_access_index < ending_index): + last_access_step = touch_file_name if touch_file_name == "setup" else touch_file_name.split("_")[1] + if (last_modify_index > starting_index) & (last_modify_index < ending_index): + last_modify_step = touch_file_name if touch_file_name == "setup" else touch_file_name.split("_")[1] + if (creation_index > starting_index) & (creation_index < ending_index): + creation_step = touch_file_name if touch_file_name == "setup" else touch_file_name.split("_")[1] + info.append({"file_name": file_name, "last_access_index": last_access_index, "last_modify_index": last_modify_index, + "creation_index": creation_index, "last_access_step":last_access_step , "last_modify_step":last_modify_step, + "creation_step": creation_step}) + info_df = pd.DataFrame(info) + info_df.to_csv("/home/runner/info.csv") + + - run: cat /home/runner/info.csv - name: Pushes to another repository id: push_directory uses: cpina/github-action-push-to-another-repository@main From 7539294124139a2a8d9e4a0c174093a16c7bfb71 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 12:12:58 +0300 Subject: [PATCH 22/41] Update ci.yml --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1927a09..127e92d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: pip install numpy - run: sudo apt update - run: sudo apt install inotify-tools - - run: inotifywait -mr /home/runner/work --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/test/test.csv & echo 'basak' + - run: inotifywait -mr /home/runner/work --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/test.csv & echo 'basak' - uses: jannekem/run-python-script-action@v1 with: script: | @@ -65,9 +65,9 @@ jobs: "creation_index": creation_index, "last_access_step":last_access_step , "last_modify_step":last_modify_step, "creation_step": creation_step}) info_df = pd.DataFrame(info) - info_df.to_csv("/home/runner/info.csv") + info_df.to_csv("/home/runner/work/MavenTestCI/MavenTestCI/test/info.csv") - - run: cat /home/runner/info.csv + - run: cat /home/runner/work/MavenTestCI/MavenTestCI/test/info.csv - name: Pushes to another repository id: push_directory uses: cpina/github-action-push-to-another-repository@main From faa20a6daf9b731521f33273897bbb39b09254d9 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 12:14:54 +0300 Subject: [PATCH 23/41] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 127e92d..c345f87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: info_df = pd.DataFrame(info) info_df.to_csv("/home/runner/work/MavenTestCI/MavenTestCI/test/info.csv") - - run: cat /home/runner/work/MavenTestCI/MavenTestCI/test/info.csv + - run: cat /home/runner/work/MavenTestCI/MavenTestCI/info.csv - name: Pushes to another repository id: push_directory uses: cpina/github-action-push-to-another-repository@main From b5386cbda6bd8c37d96de135528ed08f3ef2ab2e Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 12:23:28 +0300 Subject: [PATCH 24/41] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c345f87..0345ef8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: "creation_index": creation_index, "last_access_step":last_access_step , "last_modify_step":last_modify_step, "creation_step": creation_step}) info_df = pd.DataFrame(info) - info_df.to_csv("/home/runner/work/MavenTestCI/MavenTestCI/test/info.csv") + info_df.to_csv("/home/runner/work/MavenTestCI/MavenTestCI/info.csv") - run: cat /home/runner/work/MavenTestCI/MavenTestCI/info.csv - name: Pushes to another repository From aa17fa87411bb969231cbb5354a27a4827ddd06a Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 12:26:12 +0300 Subject: [PATCH 25/41] Update ci.yml --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0345ef8..bc42d65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,9 +65,10 @@ jobs: "creation_index": creation_index, "last_access_step":last_access_step , "last_modify_step":last_modify_step, "creation_step": creation_step}) info_df = pd.DataFrame(info) - info_df.to_csv("/home/runner/work/MavenTestCI/MavenTestCI/info.csv") + os.mkdir("home/runner/work/MavenTestCI/MavenTestCI/test") + info_df.to_csv("/home/runner/work/MavenTestCI/MavenTestCI/test/info.csv") - - run: cat /home/runner/work/MavenTestCI/MavenTestCI/info.csv + - run: cat /home/runner/work/MavenTestCI/MavenTestCI/test/info.csv - name: Pushes to another repository id: push_directory uses: cpina/github-action-push-to-another-repository@main From 519b9857bcd08dd020f15228b9c0f6bd09a7bf92 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 12:29:06 +0300 Subject: [PATCH 26/41] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc42d65..4ec77fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: "creation_index": creation_index, "last_access_step":last_access_step , "last_modify_step":last_modify_step, "creation_step": creation_step}) info_df = pd.DataFrame(info) - os.mkdir("home/runner/work/MavenTestCI/MavenTestCI/test") + print(os.getcwd()) info_df.to_csv("/home/runner/work/MavenTestCI/MavenTestCI/test/info.csv") - run: cat /home/runner/work/MavenTestCI/MavenTestCI/test/info.csv From 42d1156b2a17443925da91da57ad85c33334b88d Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 12:34:48 +0300 Subject: [PATCH 27/41] Update ci.yml --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ec77fb..bd3297a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,8 @@ jobs: "creation_index": creation_index, "last_access_step":last_access_step , "last_modify_step":last_modify_step, "creation_step": creation_step}) info_df = pd.DataFrame(info) - print(os.getcwd()) + os.mkdir("test") + print(os.listdir()) info_df.to_csv("/home/runner/work/MavenTestCI/MavenTestCI/test/info.csv") - run: cat /home/runner/work/MavenTestCI/MavenTestCI/test/info.csv From c01f3f6bb3a21d425b1120a95920fb6f01582ec4 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 12:42:02 +0300 Subject: [PATCH 28/41] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd3297a..04a9bd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,5 +77,5 @@ jobs: API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} with: source-directory: 'test' - destination-github-username: 'optimizing-ci-builds' + destination-github-username: 'ci-analyzes' destination-repository-name: 'optimizing-ci-builds' From 21f3077904790f7c0145077378dd3731a36a665f Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 12:44:28 +0300 Subject: [PATCH 29/41] Update ci.yml --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04a9bd6..6aa009a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,5 +77,5 @@ jobs: API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} with: source-directory: 'test' - destination-github-username: 'ci-analyzes' - destination-repository-name: 'optimizing-ci-builds' + destination-github-username: 'optimizing-ci-builds' + destination-repository-name: 'ci-analyzes' From 422f06cb5818085df8c6e82dc991b3dc08b5758b Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Mon, 26 Sep 2022 12:53:33 +0300 Subject: [PATCH 30/41] Update ci.yml --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6aa009a..f4df409 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,3 +79,4 @@ jobs: source-directory: 'test' destination-github-username: 'optimizing-ci-builds' destination-repository-name: 'ci-analyzes' + target-directory: "MavenTestCI" From e006cdb3408bbc202e432ac9a2323d6d063ed44a Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Fri, 28 Oct 2022 14:21:51 +0300 Subject: [PATCH 31/41] Update ci.yml --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4df409..7616da0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,7 @@ jobs: import pandas as pd import numpy as np df = pd.read_csv(f"/home/runner/test.csv", sep = ';', names=["time", "watched_filename", "event_filename", "event_name"]) + print(df.to_string()) df['event_filename'] = df['event_filename'].replace(np.nan, '') steps = {} starting_indexes = df[(df["event_filename"].str.contains("starting_")) & (df["event_name"] == "CREATE")].index.to_list() + [df.shape[0]] From f92a54c4f492a7a20116274ab68329ee4a2582bc Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Fri, 28 Oct 2022 14:27:46 +0300 Subject: [PATCH 32/41] Update ci.yml --- .github/workflows/ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7616da0..9ba80e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,20 @@ jobs: - run: sudo apt update - run: sudo apt install inotify-tools - run: inotifywait -mr /home/runner/work --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/test.csv & echo 'basak' + + - uses: actions/checkout@v3 + - name: Set up JDK 18 + uses: actions/setup-java@v3 + with: + java-version: '18' + distribution: 'adopt' + - name: Test with Maven + run: mvn clean test jacoco:report + - name: Codecov + uses: codecov/codecov-action@v3.1.0 + with: + token: ${{ secrets.CODECOV_TOKEN }} + - uses: jannekem/run-python-script-action@v1 with: script: | From c33828ed1b22b946f9ce84e1c093a0e46d566567 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Fri, 28 Oct 2022 14:28:58 +0300 Subject: [PATCH 33/41] Update ci.yml --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ba80e8..3c205c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,10 +25,6 @@ jobs: distribution: 'adopt' - name: Test with Maven run: mvn clean test jacoco:report - - name: Codecov - uses: codecov/codecov-action@v3.1.0 - with: - token: ${{ secrets.CODECOV_TOKEN }} - uses: jannekem/run-python-script-action@v1 with: From 0dd1dda6672c9f2631e39f6dde5d73987811b6a5 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Fri, 28 Oct 2022 14:31:27 +0300 Subject: [PATCH 34/41] Update ci.yml --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c205c2..5c82c45 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,14 +25,13 @@ jobs: distribution: 'adopt' - name: Test with Maven run: mvn clean test jacoco:report - + - run: cat /home/runner/work/MavenTestCI/MavenTestCI/test/info.csv - uses: jannekem/run-python-script-action@v1 with: script: | import pandas as pd import numpy as np df = pd.read_csv(f"/home/runner/test.csv", sep = ';', names=["time", "watched_filename", "event_filename", "event_name"]) - print(df.to_string()) df['event_filename'] = df['event_filename'].replace(np.nan, '') steps = {} starting_indexes = df[(df["event_filename"].str.contains("starting_")) & (df["event_name"] == "CREATE")].index.to_list() + [df.shape[0]] @@ -80,7 +79,7 @@ jobs: print(os.listdir()) info_df.to_csv("/home/runner/work/MavenTestCI/MavenTestCI/test/info.csv") - - run: cat /home/runner/work/MavenTestCI/MavenTestCI/test/info.csv + - name: Pushes to another repository id: push_directory uses: cpina/github-action-push-to-another-repository@main From 72997e667986d8df8bdfbae35603f816e4e91969 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Fri, 28 Oct 2022 14:33:58 +0300 Subject: [PATCH 35/41] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c82c45..f5ea619 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: distribution: 'adopt' - name: Test with Maven run: mvn clean test jacoco:report - - run: cat /home/runner/work/MavenTestCI/MavenTestCI/test/info.csv + - run: cat /home/runner/test.csv - uses: jannekem/run-python-script-action@v1 with: script: | From 0e2fa4da689fff620d78bad99a443ee0460d6d83 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Fri, 28 Oct 2022 14:41:46 +0300 Subject: [PATCH 36/41] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5ea619..579f86c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: pip install numpy - run: sudo apt update - run: sudo apt install inotify-tools - - run: inotifywait -mr /home/runner/work --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/test.csv & echo 'basak' + - run: inotifywait -mr /home/runner --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/test.csv & echo 'basak' - uses: actions/checkout@v3 - name: Set up JDK 18 From cf68f2d723627442475b02bf4858c1924347c96a Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Fri, 28 Oct 2022 14:44:18 +0300 Subject: [PATCH 37/41] Update ci.yml --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 579f86c..99bb20a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: pip install numpy - run: sudo apt update - run: sudo apt install inotify-tools - - run: inotifywait -mr /home/runner --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/test.csv & echo 'basak' + - run: inotifywait -mr /home/runner --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/optcibuilds/test.csv & echo 'basak' - uses: actions/checkout@v3 - name: Set up JDK 18 @@ -25,7 +25,7 @@ jobs: distribution: 'adopt' - name: Test with Maven run: mvn clean test jacoco:report - - run: cat /home/runner/test.csv + - run: cat /home/runner/optcibuilds/test.csv - uses: jannekem/run-python-script-action@v1 with: script: | From 7cd7e845fc91a1a0817b91bdb1d4815d97ee9022 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Fri, 28 Oct 2022 14:46:48 +0300 Subject: [PATCH 38/41] Update ci.yml --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99bb20a..31ebfdd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: pip install numpy - run: sudo apt update - run: sudo apt install inotify-tools - - run: inotifywait -mr /home/runner --format '%T;%w;%f;%e' --timefmt %T -o /home/runner/optcibuilds/test.csv & echo 'basak' + - run: inotifywait -mr /home/runner --format '%T;%w;%f;%e' --timefmt %T -o /home/optcibuilds/test.csv & echo 'basak' - uses: actions/checkout@v3 - name: Set up JDK 18 @@ -25,7 +25,7 @@ jobs: distribution: 'adopt' - name: Test with Maven run: mvn clean test jacoco:report - - run: cat /home/runner/optcibuilds/test.csv + - run: cat /home/optcibuilds/test.csv - uses: jannekem/run-python-script-action@v1 with: script: | From 8953831713e03c6bd633bb7f91b229084d33b541 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Fri, 28 Oct 2022 14:49:23 +0300 Subject: [PATCH 39/41] Update ci.yml --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31ebfdd..8095e76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,7 @@ jobs: pip install numpy - run: sudo apt update - run: sudo apt install inotify-tools + - run: mkdir /home/optcibuilds - run: inotifywait -mr /home/runner --format '%T;%w;%f;%e' --timefmt %T -o /home/optcibuilds/test.csv & echo 'basak' - uses: actions/checkout@v3 From eadc58635f93e6cdbff7450e96ead497dc4cc386 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Fri, 28 Oct 2022 14:50:32 +0300 Subject: [PATCH 40/41] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8095e76..7beeb3b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: pip install numpy - run: sudo apt update - run: sudo apt install inotify-tools - - run: mkdir /home/optcibuilds + - run: sudo mkdir /home/optcibuilds - run: inotifywait -mr /home/runner --format '%T;%w;%f;%e' --timefmt %T -o /home/optcibuilds/test.csv & echo 'basak' - uses: actions/checkout@v3 From 43fc08629cd436e9aaf008e82ed5e68306fb5a33 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Fri, 28 Oct 2022 14:52:17 +0300 Subject: [PATCH 41/41] Update ci.yml --- .github/workflows/ci.yml | 66 ++-------------------------------------- 1 file changed, 2 insertions(+), 64 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7beeb3b..8cdf98f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,68 +26,6 @@ jobs: distribution: 'adopt' - name: Test with Maven run: mvn clean test jacoco:report + - run: ls - run: cat /home/optcibuilds/test.csv - - uses: jannekem/run-python-script-action@v1 - with: - script: | - import pandas as pd - import numpy as np - df = pd.read_csv(f"/home/runner/test.csv", sep = ';', names=["time", "watched_filename", "event_filename", "event_name"]) - df['event_filename'] = df['event_filename'].replace(np.nan, '') - steps = {} - starting_indexes = df[(df["event_filename"].str.contains("starting_")) & (df["event_name"] == "CREATE")].index.to_list() + [df.shape[0]] - ending_indexes = [0] + df[(df["event_filename"].str.contains("starting_")) & (df["event_name"] == "CLOSE_WRITE,CLOSE")].index.to_list() - starting_df = df[df["event_filename"].str.contains("starting_")] - touch_file_names = ["setup"] + [x.replace("starting_", "") for x in starting_df["event_filename"].value_counts().index.to_list()] - for starting_index, ending_index, touch_file_name in zip(starting_indexes, ending_indexes, touch_file_names): - steps[touch_file_name] = (ending_index, starting_index) - df["watched_filename"] = df["watched_filename"] + df["event_filename"] - df.drop("event_filename", axis=1, inplace=True) - df.rename(columns={'watched_filename':'file_name'}, inplace=True) - modify_df = df[df["event_name"] == "MODIFY"] - file_names = modify_df["file_name"].value_counts().index.to_list() - info = [] - for file_name in file_names: - last_access_step = "" - last_modify_step = "" - creation_step = "" - if df[(df["file_name"] == file_name) & (df["event_name"] == "MODIFY")].shape[0] == 0: continue - last_modify_index = df[(df["file_name"] == file_name) & (df["event_name"] == "MODIFY")].index.to_list()[-1] - last_access_index = 0 - if df[(df["file_name"] == file_name) & (df["event_name"] == "ACCESS")].shape[0] > 0: - last_access_index = df[(df["file_name"] == file_name) & (df["event_name"] == "ACCESS")].index.to_list()[-1] - else: - last_access_index = -1 - last_access_step = "Not provided" - if last_access_index < last_modify_index: - try: - creation_index = df[(df["file_name"] == file_name) & (df["event_name"] == "CREATE")].index.to_list()[0] - except: - creation_index = -1 - creation_step = "Not provided" - for touch_file_name, (starting_index, ending_index) in steps.items(): - if (last_access_index > starting_index) & (last_access_index < ending_index): - last_access_step = touch_file_name if touch_file_name == "setup" else touch_file_name.split("_")[1] - if (last_modify_index > starting_index) & (last_modify_index < ending_index): - last_modify_step = touch_file_name if touch_file_name == "setup" else touch_file_name.split("_")[1] - if (creation_index > starting_index) & (creation_index < ending_index): - creation_step = touch_file_name if touch_file_name == "setup" else touch_file_name.split("_")[1] - info.append({"file_name": file_name, "last_access_index": last_access_index, "last_modify_index": last_modify_index, - "creation_index": creation_index, "last_access_step":last_access_step , "last_modify_step":last_modify_step, - "creation_step": creation_step}) - info_df = pd.DataFrame(info) - os.mkdir("test") - print(os.listdir()) - info_df.to_csv("/home/runner/work/MavenTestCI/MavenTestCI/test/info.csv") - - - - name: Pushes to another repository - id: push_directory - uses: cpina/github-action-push-to-another-repository@main - env: - API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} - with: - source-directory: 'test' - destination-github-username: 'optimizing-ci-builds' - destination-repository-name: 'ci-analyzes' - target-directory: "MavenTestCI" +