From c477eaf866dfba99adc37d43fad3af2d15c35b0d Mon Sep 17 00:00:00 2001 From: testuser Date: Tue, 27 Jun 2023 15:47:46 -0400 Subject: [PATCH 01/30] Initial commit of containerized GitHub actions to run unit tests. --- .github/workflows/test.yaml | 13 +++++++++++++ Dockerfile | 9 +++++++++ 2 files changed, 22 insertions(+) create mode 100644 .github/workflows/test.yaml create mode 100644 Dockerfile diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000..a65a5a50 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,13 @@ +name test + +on: [push] + +jobs: + unit_tests: + runs_on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: build Docker image + run: docker build -t ccpp . + - name: run tsts in container + run: docker run --name test-container -t ccpp bash -c 'cd ccpp/test && ./run_tests.sh' \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..838f32f1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM fedora:37 + +RUN dnf -y update && \ + dnf -y install cmake gcc-g++ gcc-fortran make git && \ + dnf clean all + +COPY . /ccpp/ + +ENTRYPOINT [ '/bin/bash' ] \ No newline at end of file From 43a47e42780a064a7e218c16154f063bf3497fe5 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Tue, 27 Jun 2023 15:51:30 -0400 Subject: [PATCH 02/30] Fixing typo from previous commit. --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a65a5a50..2a9b3f80 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,4 +1,4 @@ -name test +name: test on: [push] From 5cc29b59688e4567cd014de05476a6cc130616c6 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Tue, 27 Jun 2023 15:52:28 -0400 Subject: [PATCH 03/30] Fixing typo from previous commit. --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2a9b3f80..182cb56c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -4,7 +4,7 @@ on: [push] jobs: unit_tests: - runs_on: ubuntu-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: build Docker image From aaa12aa824fc1695f5290bb9dfd1cadae644b789 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Tue, 27 Jun 2023 15:58:24 -0400 Subject: [PATCH 04/30] Addming missing python dependency. --- .github/workflows/test.yaml | 2 +- Dockerfile | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 182cb56c..d4c8f497 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,4 +10,4 @@ jobs: - name: build Docker image run: docker build -t ccpp . - name: run tsts in container - run: docker run --name test-container -t ccpp bash -c 'cd ccpp/test && ./run_tests.sh' \ No newline at end of file + run: docker run --name test-container -t ccpp bash -c 'source ccpp-env/bin/activate && cd ccpp/test && ./run_tests.sh' \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 838f32f1..454612e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,13 @@ FROM fedora:37 RUN dnf -y update && \ - dnf -y install cmake gcc-g++ gcc-fortran make git && \ + dnf -y install cmake gcc-g++ gcc-fortran make git python3 && \ dnf clean all +RUN python3 -m venv ./ccpp-env && \ + source ./ccpp-env/bin/activate && \ + pip3 install -y pytest black flake8 pylint + COPY . /ccpp/ ENTRYPOINT [ '/bin/bash' ] \ No newline at end of file From 92680b79119d11fd83dc847530006927600ca34e Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Tue, 27 Jun 2023 16:14:49 -0400 Subject: [PATCH 05/30] Removing incorrect flag from pip install. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 454612e1..dfb7a3d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ FROM fedora:37 RUN dnf -y update && \ - dnf -y install cmake gcc-g++ gcc-fortran make git python3 && \ + dnf -y install cmake gcc-g++ gcc-fortran make git && \ dnf clean all RUN python3 -m venv ./ccpp-env && \ source ./ccpp-env/bin/activate && \ - pip3 install -y pytest black flake8 pylint + pip3 install pytest black flake8 pylint COPY . /ccpp/ From 3ff2d09a84383b734d113259d0ad9d991dba682f Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Tue, 27 Jun 2023 16:39:51 -0400 Subject: [PATCH 06/30] Replacing incorrect Dockerfile instruction. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index dfb7a3d2..04b6dbc9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,4 +10,4 @@ RUN python3 -m venv ./ccpp-env && \ COPY . /ccpp/ -ENTRYPOINT [ '/bin/bash' ] \ No newline at end of file +CMD ["/bin/bash"] \ No newline at end of file From 7cce8c5cf868956805d34c57735089293b2139de Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Tue, 27 Jun 2023 17:01:33 -0400 Subject: [PATCH 07/30] Returning non-zero if test failures detected. --- test/run_tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/run_tests.sh b/test/run_tests.sh index 97001d30..81ffdb00 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -67,4 +67,5 @@ if [ $errcnt -eq 0 ]; then echo "All tests PASSed!" else echo "${errcnt} tests FAILed" + return 1 fi From 8ac4c7ee43e35136ab3a9d0421c5027f6d7b651f Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 28 Jun 2023 13:56:21 -0400 Subject: [PATCH 08/30] Removing test failing due to not being fully implemented yet. --- test/run_tests.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/run_tests.sh b/test/run_tests.sh index 81ffdb00..a7f07456 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -38,12 +38,13 @@ if [ $res -ne 0 ]; then fi # Run var_action test -./var_action_test/run_test -res=$? -errcnt=$((errcnt + res)) -if [ $res -ne 0 ]; then - echo "Failure running var_action test" -fi +# TODO: Re-enable after feature fully implemented. +# ./var_action_test/run_test +# res=$? +# errcnt=$((errcnt + res)) +# if [ $res -ne 0 ]; then +# echo "Failure running var_action test" +# fi # Run doctests ./run_doctest.sh From 00edf9a6f87dfed8dc5d685f08414be25a0e055b Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 28 Jun 2023 14:18:19 -0400 Subject: [PATCH 09/30] Addming missing newlines. --- .github/workflows/test.yaml | 3 ++- Dockerfile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d4c8f497..af9778ba 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,4 +10,5 @@ jobs: - name: build Docker image run: docker build -t ccpp . - name: run tsts in container - run: docker run --name test-container -t ccpp bash -c 'source ccpp-env/bin/activate && cd ccpp/test && ./run_tests.sh' \ No newline at end of file + run: docker run --name test-container -t ccpp bash -c 'source ccpp-env/bin/activate && cd ccpp/test && ./run_tests.sh' + diff --git a/Dockerfile b/Dockerfile index 04b6dbc9..17a11a9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,4 +10,5 @@ RUN python3 -m venv ./ccpp-env && \ COPY . /ccpp/ -CMD ["/bin/bash"] \ No newline at end of file +CMD ["/bin/bash"] + From d3413c15bea41132597beebe87b88e98fae5bb74 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Mon, 3 Jul 2023 10:03:00 -0400 Subject: [PATCH 10/30] Adding testing CI action to pull requests and all branches. --- .github/workflows/test.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index af9778ba..9354d2f5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,6 +1,12 @@ name: test -on: [push] +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + #Trigger workflow on push to any branch or branch heirarchy: + - '**' jobs: unit_tests: From f3fa550ceb87c63b7777cea5f4c709596b1d7550 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Mon, 3 Jul 2023 10:04:54 -0400 Subject: [PATCH 11/30] Updating workflow name with more accurate description. --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9354d2f5..4e33996e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,4 +1,4 @@ -name: test +name: Capgen Unit Tests on: pull_request: From 7c5c3fb54d2e85ee3759a86e1d2ec8982918c9ec Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Mon, 3 Jul 2023 10:05:56 -0400 Subject: [PATCH 12/30] Renaming capgen unit test workflow file. --- .github/workflows/{test.yaml => capgen_unit_tests.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{test.yaml => capgen_unit_tests.yaml} (100%) diff --git a/.github/workflows/test.yaml b/.github/workflows/capgen_unit_tests.yaml similarity index 100% rename from .github/workflows/test.yaml rename to .github/workflows/capgen_unit_tests.yaml From 97cd70ae3520a9823f44601fcaeb92f750830488 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Mon, 3 Jul 2023 10:07:03 -0400 Subject: [PATCH 13/30] Fixing typo. --- .github/workflows/capgen_unit_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/capgen_unit_tests.yaml b/.github/workflows/capgen_unit_tests.yaml index 4e33996e..f3402a4d 100644 --- a/.github/workflows/capgen_unit_tests.yaml +++ b/.github/workflows/capgen_unit_tests.yaml @@ -15,6 +15,6 @@ jobs: - uses: actions/checkout@v3 - name: build Docker image run: docker build -t ccpp . - - name: run tsts in container + - name: run tests in container run: docker run --name test-container -t ccpp bash -c 'source ccpp-env/bin/activate && cd ccpp/test && ./run_tests.sh' From e5fdab9153eb84e3e7aaa3e7c50c955f0d072571 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Mon, 3 Jul 2023 10:09:50 -0400 Subject: [PATCH 14/30] Moving capgen Dockerfile into test directory. --- .github/workflows/capgen_unit_tests.yaml | 2 +- Dockerfile => test/Dockerfile | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename Dockerfile => test/Dockerfile (100%) diff --git a/.github/workflows/capgen_unit_tests.yaml b/.github/workflows/capgen_unit_tests.yaml index f3402a4d..4cc813ec 100644 --- a/.github/workflows/capgen_unit_tests.yaml +++ b/.github/workflows/capgen_unit_tests.yaml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: build Docker image - run: docker build -t ccpp . + run: docker build -f test/Dockerfile -t ccpp . - name: run tests in container run: docker run --name test-container -t ccpp bash -c 'source ccpp-env/bin/activate && cd ccpp/test && ./run_tests.sh' diff --git a/Dockerfile b/test/Dockerfile similarity index 100% rename from Dockerfile rename to test/Dockerfile From d5cc5f51afb8c28dce243447d648e867c1356f11 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Mon, 3 Jul 2023 10:40:00 -0400 Subject: [PATCH 15/30] Adding print statement to test output for reasong for skipping var_action_test. --- test/run_tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/run_tests.sh b/test/run_tests.sh index a7f07456..04ce5e8c 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -45,6 +45,7 @@ fi # if [ $res -ne 0 ]; then # echo "Failure running var_action test" # fi +echo "Skipping var_action_test/run_test until feature is fully implemented" # Run doctests ./run_doctest.sh From a10648a0848b664c315c7636df20a0001354f445 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 5 Jul 2023 09:54:41 -0400 Subject: [PATCH 16/30] Moving tests to running in github container directly. --- .github/workflows/capgen_unit_tests.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/capgen_unit_tests.yaml b/.github/workflows/capgen_unit_tests.yaml index 4cc813ec..6b9da125 100644 --- a/.github/workflows/capgen_unit_tests.yaml +++ b/.github/workflows/capgen_unit_tests.yaml @@ -13,8 +13,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: build Docker image - run: docker build -f test/Dockerfile -t ccpp . - - name: run tests in container - run: docker run --name test-container -t ccpp bash -c 'source ccpp-env/bin/activate && cd ccpp/test && ./run_tests.sh' + - name: update repos and install dependencies + run: apt update && apt install -y cmake gcc-g++ gcc-fortran make python3 git + - name: create python venv + run: python3 -m venv ./ccpp-env && source ./ccpp-env/bin/activate && pip3 install -r requirements.txt + - name: Run unit tests + run: source ccpp-env/bin/activate && cd ccpp/test && ./run_tests.sh From 374a47302e53f7494cd60aabccaf4d88de11bb36 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 5 Jul 2023 09:55:57 -0400 Subject: [PATCH 17/30] Replacing apt calls with apt-get. --- .github/workflows/capgen_unit_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/capgen_unit_tests.yaml b/.github/workflows/capgen_unit_tests.yaml index 6b9da125..ed8fb950 100644 --- a/.github/workflows/capgen_unit_tests.yaml +++ b/.github/workflows/capgen_unit_tests.yaml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: update repos and install dependencies - run: apt update && apt install -y cmake gcc-g++ gcc-fortran make python3 git + run: apt-get update && apt-get install -y cmake gcc-g++ gcc-fortran make python3 git - name: create python venv run: python3 -m venv ./ccpp-env && source ./ccpp-env/bin/activate && pip3 install -r requirements.txt - name: Run unit tests From 7030d43c9cfab9f57dcef281efa7ea0103cd6d3b Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 5 Jul 2023 09:57:35 -0400 Subject: [PATCH 18/30] Adding sudo to apt-get commands. --- .github/workflows/capgen_unit_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/capgen_unit_tests.yaml b/.github/workflows/capgen_unit_tests.yaml index ed8fb950..0cfb18eb 100644 --- a/.github/workflows/capgen_unit_tests.yaml +++ b/.github/workflows/capgen_unit_tests.yaml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: update repos and install dependencies - run: apt-get update && apt-get install -y cmake gcc-g++ gcc-fortran make python3 git + run: sudo apt-get update && sudo apt-get install -y cmake gcc-g++ gcc-fortran make python3 git - name: create python venv run: python3 -m venv ./ccpp-env && source ./ccpp-env/bin/activate && pip3 install -r requirements.txt - name: Run unit tests From d0e2e22708ea01f0605fce52b3d391c67fdd8cb3 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 5 Jul 2023 10:01:33 -0400 Subject: [PATCH 19/30] Updating package names to ubuntu packages. --- .github/workflows/capgen_unit_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/capgen_unit_tests.yaml b/.github/workflows/capgen_unit_tests.yaml index 0cfb18eb..a0482f9f 100644 --- a/.github/workflows/capgen_unit_tests.yaml +++ b/.github/workflows/capgen_unit_tests.yaml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: update repos and install dependencies - run: sudo apt-get update && sudo apt-get install -y cmake gcc-g++ gcc-fortran make python3 git + run: sudo apt-get update && sudo apt-get install -y build-essential gfortran cmake python3 git - name: create python venv run: python3 -m venv ./ccpp-env && source ./ccpp-env/bin/activate && pip3 install -r requirements.txt - name: Run unit tests From 5e700515d166bea3fd2a648d400f0499ca2824e5 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 5 Jul 2023 10:05:54 -0400 Subject: [PATCH 20/30] Updating path to cd into. --- .github/workflows/capgen_unit_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/capgen_unit_tests.yaml b/.github/workflows/capgen_unit_tests.yaml index a0482f9f..17dba199 100644 --- a/.github/workflows/capgen_unit_tests.yaml +++ b/.github/workflows/capgen_unit_tests.yaml @@ -18,5 +18,5 @@ jobs: - name: create python venv run: python3 -m venv ./ccpp-env && source ./ccpp-env/bin/activate && pip3 install -r requirements.txt - name: Run unit tests - run: source ccpp-env/bin/activate && cd ccpp/test && ./run_tests.sh + run: source ccpp-env/bin/activate && cd test && ./run_tests.sh From e76bb45b7af94c993624243015873e13e95de9b7 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 5 Jul 2023 10:13:35 -0400 Subject: [PATCH 21/30] Removing test/Dockerfile as no longer needed. --- test/Dockerfile | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 test/Dockerfile diff --git a/test/Dockerfile b/test/Dockerfile deleted file mode 100644 index 17a11a9c..00000000 --- a/test/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM fedora:37 - -RUN dnf -y update && \ - dnf -y install cmake gcc-g++ gcc-fortran make git && \ - dnf clean all - -RUN python3 -m venv ./ccpp-env && \ - source ./ccpp-env/bin/activate && \ - pip3 install pytest black flake8 pylint - -COPY . /ccpp/ - -CMD ["/bin/bash"] - From 752f1f1f212348354baaeb5f4d445aca353df5e8 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 5 Jul 2023 11:24:03 -0400 Subject: [PATCH 22/30] Removing un-needed python dependencies install step. --- .github/workflows/capgen_unit_tests.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/capgen_unit_tests.yaml b/.github/workflows/capgen_unit_tests.yaml index 17dba199..4c2d6cdc 100644 --- a/.github/workflows/capgen_unit_tests.yaml +++ b/.github/workflows/capgen_unit_tests.yaml @@ -15,8 +15,6 @@ jobs: - uses: actions/checkout@v3 - name: update repos and install dependencies run: sudo apt-get update && sudo apt-get install -y build-essential gfortran cmake python3 git - - name: create python venv - run: python3 -m venv ./ccpp-env && source ./ccpp-env/bin/activate && pip3 install -r requirements.txt - name: Run unit tests run: source ccpp-env/bin/activate && cd test && ./run_tests.sh From 62a0d0376e2ba7951940e52b825f7da0d9b3f8d9 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 5 Jul 2023 11:25:26 -0400 Subject: [PATCH 23/30] Removing sourcing python venv. --- .github/workflows/capgen_unit_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/capgen_unit_tests.yaml b/.github/workflows/capgen_unit_tests.yaml index 4c2d6cdc..3dde695b 100644 --- a/.github/workflows/capgen_unit_tests.yaml +++ b/.github/workflows/capgen_unit_tests.yaml @@ -16,5 +16,5 @@ jobs: - name: update repos and install dependencies run: sudo apt-get update && sudo apt-get install -y build-essential gfortran cmake python3 git - name: Run unit tests - run: source ccpp-env/bin/activate && cd test && ./run_tests.sh + run: cd test && ./run_tests.sh From 2552b69c8741ab708c5a1c1500a9fe2155655dbe Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Thu, 6 Jul 2023 23:13:53 -0400 Subject: [PATCH 24/30] Filtering CI action to only auto run if in a PR or pushing to the main repo. --- .github/workflows/capgen_unit_tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/capgen_unit_tests.yaml b/.github/workflows/capgen_unit_tests.yaml index 3dde695b..02c60ced 100644 --- a/.github/workflows/capgen_unit_tests.yaml +++ b/.github/workflows/capgen_unit_tests.yaml @@ -10,6 +10,7 @@ on: jobs: unit_tests: + if: github.event_name == 'pull_request' || github.repository == 'NCAR/ccpp-framework' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 731a0cb66d53f1bb6c41b1b774268d815c476576 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Thu, 6 Jul 2023 23:20:42 -0400 Subject: [PATCH 25/30] Testing allowing run of actions manually. --- .github/workflows/capgen_unit_tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/capgen_unit_tests.yaml b/.github/workflows/capgen_unit_tests.yaml index 02c60ced..32bb77e2 100644 --- a/.github/workflows/capgen_unit_tests.yaml +++ b/.github/workflows/capgen_unit_tests.yaml @@ -7,6 +7,7 @@ on: branches: #Trigger workflow on push to any branch or branch heirarchy: - '**' + workflow_dispatch: jobs: unit_tests: From b4ba84c54db2c6e7b93499d5d4d099ab67471db9 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Thu, 6 Jul 2023 23:38:50 -0400 Subject: [PATCH 26/30] Adding proper filter to job to run unit test action manually. --- .github/workflows/capgen_unit_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/capgen_unit_tests.yaml b/.github/workflows/capgen_unit_tests.yaml index 32bb77e2..3fce1de9 100644 --- a/.github/workflows/capgen_unit_tests.yaml +++ b/.github/workflows/capgen_unit_tests.yaml @@ -11,7 +11,7 @@ on: jobs: unit_tests: - if: github.event_name == 'pull_request' || github.repository == 'NCAR/ccpp-framework' + if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || github.repository == 'NCAR/ccpp-framework' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From af5119bba76fe90bf25388faa5c49512342238d1 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Fri, 7 Jul 2023 14:10:29 -0400 Subject: [PATCH 27/30] Fixing format of workflow_dispatch declaration. --- .github/workflows/capgen_unit_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/capgen_unit_tests.yaml b/.github/workflows/capgen_unit_tests.yaml index 3fce1de9..74347ff4 100644 --- a/.github/workflows/capgen_unit_tests.yaml +++ b/.github/workflows/capgen_unit_tests.yaml @@ -7,7 +7,7 @@ on: branches: #Trigger workflow on push to any branch or branch heirarchy: - '**' - workflow_dispatch: + workflow_dispatch jobs: unit_tests: From 813e46a632b6201b861197d0e97236b7ec22c46a Mon Sep 17 00:00:00 2001 From: mwaxmonsky <137746677+mwaxmonsky@users.noreply.github.com> Date: Fri, 7 Jul 2023 14:38:22 -0400 Subject: [PATCH 28/30] Changing ordering of workflow triggers. --- .github/workflows/capgen_unit_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/capgen_unit_tests.yaml b/.github/workflows/capgen_unit_tests.yaml index 74347ff4..eb574f2d 100644 --- a/.github/workflows/capgen_unit_tests.yaml +++ b/.github/workflows/capgen_unit_tests.yaml @@ -1,13 +1,13 @@ name: Capgen Unit Tests on: + workflow_dispatch: pull_request: types: [opened, synchronize, reopened] push: branches: #Trigger workflow on push to any branch or branch heirarchy: - '**' - workflow_dispatch jobs: unit_tests: From 08c5503c41f47883e29ae7529c030663f9f2fb6f Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Fri, 7 Jul 2023 15:43:26 -0400 Subject: [PATCH 29/30] Adding initial pylint configuration. --- .github/workflows/capgen_python_linting.yaml | 31 ++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/capgen_python_linting.yaml diff --git a/.github/workflows/capgen_python_linting.yaml b/.github/workflows/capgen_python_linting.yaml new file mode 100644 index 00000000..cb0db1b3 --- /dev/null +++ b/.github/workflows/capgen_python_linting.yaml @@ -0,0 +1,31 @@ +name: Capgen Python Linting + +on: + workflow_dispatch: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + #Trigger workflow on push to any branch or branch heirarchy: + - '**' + +jobs: + capgen_python_linting: + strategy: + matrix: + python-version: [3.7] + if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || github.repository == 'NCAR/ccpp-framework' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + pip3 install pylint + - name: Run pylint against capgen files + run: | + cd test && pylint From e28d5d504c11f5c7a57fe280dc07909eba2f1c62 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Fri, 7 Jul 2023 17:50:04 -0400 Subject: [PATCH 30/30] Removing pylint job to evaluate in a new PR. --- .github/workflows/capgen_python_linting.yaml | 31 -------------------- 1 file changed, 31 deletions(-) delete mode 100644 .github/workflows/capgen_python_linting.yaml diff --git a/.github/workflows/capgen_python_linting.yaml b/.github/workflows/capgen_python_linting.yaml deleted file mode 100644 index cb0db1b3..00000000 --- a/.github/workflows/capgen_python_linting.yaml +++ /dev/null @@ -1,31 +0,0 @@ -name: Capgen Python Linting - -on: - workflow_dispatch: - pull_request: - types: [opened, synchronize, reopened] - push: - branches: - #Trigger workflow on push to any branch or branch heirarchy: - - '**' - -jobs: - capgen_python_linting: - strategy: - matrix: - python-version: [3.7] - if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || github.repository == 'NCAR/ccpp-framework' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python3 -m pip install --upgrade pip - pip3 install pylint - - name: Run pylint against capgen files - run: | - cd test && pylint