From d201ee7d2588f32a6399179e02e25228502a014d Mon Sep 17 00:00:00 2001 From: Rory Barnes Date: Wed, 4 Sep 2024 11:17:20 -0700 Subject: [PATCH 1/9] Inserted location of unit tests to linux tests --- .github/workflows/tests-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-linux.yml b/.github/workflows/tests-linux.yml index e7053fd1a..255f6c7d5 100644 --- a/.github/workflows/tests-linux.yml +++ b/.github/workflows/tests-linux.yml @@ -46,7 +46,7 @@ jobs: shell: bash -l {0} run: | make opt - pytest --tb=short + pytest --tb=short --junitxml=junit/test-results.xml - name: Check test ouptut created id: check_test_file From 7f261f680cef712f0a2d5058053ca7769d5e96b9 Mon Sep 17 00:00:00 2001 From: Rory Barnes Date: Wed, 4 Sep 2024 11:34:43 -0700 Subject: [PATCH 2/9] Trying to fix how job ids are found in GitHub Actions Also removed imp and subprocess from setup.py. --- .github/workflows/tests-linux.yml | 3 +++ .github/workflows/tests-macos-intel.yml | 11 ++++++++++- .github/workflows/tests-macos-silicon.yml | 11 ++++++++++- setup.py | 2 -- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests-linux.yml b/.github/workflows/tests-linux.yml index 255f6c7d5..7d0d6b469 100644 --- a/.github/workflows/tests-linux.yml +++ b/.github/workflows/tests-linux.yml @@ -63,6 +63,9 @@ jobs: - name: Get unique id uses: Tiryoh/gha-jobid-action@v1 id: jobs + with: + job_name: "Testing ${{ matrix.os }}:python-${{ matrix.python-version }}" # input job..name and matrix here. + per_page: 50 # input matrix size here if it is larger than 30 - name: Publish unit test results uses: EnricoMi/publish-unit-test-result-action@v2 diff --git a/.github/workflows/tests-macos-intel.yml b/.github/workflows/tests-macos-intel.yml index 243088828..a0dfc3c4d 100644 --- a/.github/workflows/tests-macos-intel.yml +++ b/.github/workflows/tests-macos-intel.yml @@ -35,8 +35,17 @@ jobs: if: steps.setup_python.outcome == 'success' run: | make opt - pytest --tb=short + pytest --tb=short --junitxml=junit/test-results.xml + + - name: Check test ouptut created + id: check_test_file + uses: andstor/file-existence-action@v3 + with: + files: "/home/runner/work/vplanet/vplanet/junit/test-results.xml" + fail: true - name: Get unique id uses: Tiryoh/gha-jobid-action@v1 id: jobs + with: + job_name: "Testing ${{ matrix.os }}:python-${{ matrix.python-version }}" diff --git a/.github/workflows/tests-macos-silicon.yml b/.github/workflows/tests-macos-silicon.yml index 283278d1a..ce7754967 100644 --- a/.github/workflows/tests-macos-silicon.yml +++ b/.github/workflows/tests-macos-silicon.yml @@ -35,8 +35,17 @@ jobs: if: steps.setup_python.outcome == 'success' run: | make opt - pytest --tb=short + pytest --tb=short --junitxml=junit/test-results.xml + + - name: Check test ouptut created + id: check_test_file + uses: andstor/file-existence-action@v3 + with: + files: "/home/runner/work/vplanet/vplanet/junit/test-results.xml" + fail: true - name: Get unique id uses: Tiryoh/gha-jobid-action@v1 id: jobs + with: + job_name: "Testing ${{ matrix.os }}:python-${{ matrix.python-version }}" diff --git a/setup.py b/setup.py index 366ff4c37..bd5e7c596 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,4 @@ -import imp import os -import subprocess as sub import sys from distutils.command.clean import clean from glob import glob From be505e6690cb038cb43feb2ed5a07991950c1428 Mon Sep 17 00:00:00 2001 From: Rory Barnes Date: Wed, 4 Sep 2024 11:54:03 -0700 Subject: [PATCH 3/9] Adjusted job_name format to comply with GitHub Actions formats for matrix jobs. --- .github/workflows/tests-linux.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/tests-linux.yml b/.github/workflows/tests-linux.yml index 7d0d6b469..242a25933 100644 --- a/.github/workflows/tests-linux.yml +++ b/.github/workflows/tests-linux.yml @@ -64,8 +64,7 @@ jobs: uses: Tiryoh/gha-jobid-action@v1 id: jobs with: - job_name: "Testing ${{ matrix.os }}:python-${{ matrix.python-version }}" # input job..name and matrix here. - per_page: 50 # input matrix size here if it is larger than 30 + job_name: "Testing (${{ matrix.os }}:python-${{ matrix.python-version }})" - name: Publish unit test results uses: EnricoMi/publish-unit-test-result-action@v2 From 7b1a9b8028d16e31144668752123b94023b7e9ea Mon Sep 17 00:00:00 2001 From: Rory Barnes Date: Wed, 4 Sep 2024 12:05:20 -0700 Subject: [PATCH 4/9] Listing job IDs to try to debug why I can't get them --- .github/workflows/tests-linux.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests-linux.yml b/.github/workflows/tests-linux.yml index 242a25933..a6f0f1794 100644 --- a/.github/workflows/tests-linux.yml +++ b/.github/workflows/tests-linux.yml @@ -55,10 +55,10 @@ jobs: files: "/home/runner/work/vplanet/vplanet/junit/test-results.xml" fail: true - - name: Generate coverage - id: coverage - if: steps.test.outcome == 'success' && steps.check_test_file.outcome == 'success' - run: make coverage + - name: List all jobs in the workflow run + uses: Tiryoh/gha-jobid-action@v1 + with: + list: true - name: Get unique id uses: Tiryoh/gha-jobid-action@v1 @@ -72,6 +72,11 @@ jobs: with: files: junit/test-*.xml + - name: Generate coverage + id: coverage + if: steps.test.outcome == 'success' && steps.check_test_file.outcome == 'success' + run: make coverage + - name: CodeCov if: ${{ matrix.os }} == ubuntu-22.04 && ${{ matrix.python-version }} == '3.9' uses: codecov/codecov-action@v4 From b2212f53dbeea4e18b41cf3f52e5e3a2cfe9aff5 Mon Sep 17 00:00:00 2001 From: Rory Barnes Date: Wed, 4 Sep 2024 12:10:12 -0700 Subject: [PATCH 5/9] Removed jobID fetch in tests-linux.yml --- .github/workflows/tests-linux.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/tests-linux.yml b/.github/workflows/tests-linux.yml index a6f0f1794..b6d3e4376 100644 --- a/.github/workflows/tests-linux.yml +++ b/.github/workflows/tests-linux.yml @@ -60,12 +60,6 @@ jobs: with: list: true - - name: Get unique id - uses: Tiryoh/gha-jobid-action@v1 - id: jobs - with: - job_name: "Testing (${{ matrix.os }}:python-${{ matrix.python-version }})" - - name: Publish unit test results uses: EnricoMi/publish-unit-test-result-action@v2 if: always() From f7f386c285814dbc71fd9bb731b45f1078811564 Mon Sep 17 00:00:00 2001 From: Rory Barnes Date: Wed, 4 Sep 2024 12:11:09 -0700 Subject: [PATCH 6/9] Removed list of job ids, too --- .github/workflows/tests-linux.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/tests-linux.yml b/.github/workflows/tests-linux.yml index b6d3e4376..2d90d3f93 100644 --- a/.github/workflows/tests-linux.yml +++ b/.github/workflows/tests-linux.yml @@ -55,11 +55,6 @@ jobs: files: "/home/runner/work/vplanet/vplanet/junit/test-results.xml" fail: true - - name: List all jobs in the workflow run - uses: Tiryoh/gha-jobid-action@v1 - with: - list: true - - name: Publish unit test results uses: EnricoMi/publish-unit-test-result-action@v2 if: always() From 73d1e51f57cba4c049748900816261d6740c2d89 Mon Sep 17 00:00:00 2001 From: Rory Barnes Date: Wed, 4 Sep 2024 12:30:21 -0700 Subject: [PATCH 7/9] Simplified testing workflows to exclude capture of job ID, and only report unit test results and coverage for ubuntu 22 and python 3.9. --- .github/workflows/tests-linux.yml | 11 ++++++----- .github/workflows/tests-macos-intel.yml | 6 ------ .github/workflows/tests-macos-silicon.yml | 5 ----- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/tests-linux.yml b/.github/workflows/tests-linux.yml index 2d90d3f93..f79c0ca18 100644 --- a/.github/workflows/tests-linux.yml +++ b/.github/workflows/tests-linux.yml @@ -48,26 +48,27 @@ jobs: make opt pytest --tb=short --junitxml=junit/test-results.xml - - name: Check test ouptut created + - name: Check test output created id: check_test_file + if: ${{ matrix.os == 'ubuntu-22.04' && matrix.python-version == '3.9' }} uses: andstor/file-existence-action@v3 with: files: "/home/runner/work/vplanet/vplanet/junit/test-results.xml" fail: true - name: Publish unit test results + if: ${{ matrix.os == 'ubuntu-22.04' && matrix.python-version == '3.9' }} uses: EnricoMi/publish-unit-test-result-action@v2 - if: always() with: files: junit/test-*.xml - name: Generate coverage id: coverage - if: steps.test.outcome == 'success' && steps.check_test_file.outcome == 'success' + if: ${{ matrix.os == 'ubuntu-22.04' && matrix.python-version == '3.9' && steps.test.outcome == 'success' && steps.check_test_file.outcome == 'success' }} run: make coverage - - name: CodeCov - if: ${{ matrix.os }} == ubuntu-22.04 && ${{ matrix.python-version }} == '3.9' + - name: Upload to CodeCov + if: ${{ matrix.os == 'ubuntu-22.04' && matrix.python-version == '3.9' }} uses: codecov/codecov-action@v4 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/tests-macos-intel.yml b/.github/workflows/tests-macos-intel.yml index a0dfc3c4d..f4cbc123a 100644 --- a/.github/workflows/tests-macos-intel.yml +++ b/.github/workflows/tests-macos-intel.yml @@ -43,9 +43,3 @@ jobs: with: files: "/home/runner/work/vplanet/vplanet/junit/test-results.xml" fail: true - - - name: Get unique id - uses: Tiryoh/gha-jobid-action@v1 - id: jobs - with: - job_name: "Testing ${{ matrix.os }}:python-${{ matrix.python-version }}" diff --git a/.github/workflows/tests-macos-silicon.yml b/.github/workflows/tests-macos-silicon.yml index ce7754967..2c8918042 100644 --- a/.github/workflows/tests-macos-silicon.yml +++ b/.github/workflows/tests-macos-silicon.yml @@ -44,8 +44,3 @@ jobs: files: "/home/runner/work/vplanet/vplanet/junit/test-results.xml" fail: true - - name: Get unique id - uses: Tiryoh/gha-jobid-action@v1 - id: jobs - with: - job_name: "Testing ${{ matrix.os }}:python-${{ matrix.python-version }}" From f5c2a94c9cc12542644afc9d643eaef9f317b578 Mon Sep 17 00:00:00 2001 From: Rory Barnes Date: Wed, 4 Sep 2024 13:41:04 -0700 Subject: [PATCH 8/9] Made the check of unit test outputs OS agnostic --- .github/workflows/tests-linux.yml | 2 +- .github/workflows/tests-macos-intel.yml | 2 +- .github/workflows/tests-macos-silicon.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests-linux.yml b/.github/workflows/tests-linux.yml index f79c0ca18..e0b1ce3aa 100644 --- a/.github/workflows/tests-linux.yml +++ b/.github/workflows/tests-linux.yml @@ -53,7 +53,7 @@ jobs: if: ${{ matrix.os == 'ubuntu-22.04' && matrix.python-version == '3.9' }} uses: andstor/file-existence-action@v3 with: - files: "/home/runner/work/vplanet/vplanet/junit/test-results.xml" + files: "${{ github.workspace }}/junit/test-results.xml" fail: true - name: Publish unit test results diff --git a/.github/workflows/tests-macos-intel.yml b/.github/workflows/tests-macos-intel.yml index f4cbc123a..ebd51b9dc 100644 --- a/.github/workflows/tests-macos-intel.yml +++ b/.github/workflows/tests-macos-intel.yml @@ -41,5 +41,5 @@ jobs: id: check_test_file uses: andstor/file-existence-action@v3 with: - files: "/home/runner/work/vplanet/vplanet/junit/test-results.xml" + files: "${{ github.workspace }}/junit/test-results.xml" fail: true diff --git a/.github/workflows/tests-macos-silicon.yml b/.github/workflows/tests-macos-silicon.yml index 2c8918042..eb9dfc32e 100644 --- a/.github/workflows/tests-macos-silicon.yml +++ b/.github/workflows/tests-macos-silicon.yml @@ -41,6 +41,6 @@ jobs: id: check_test_file uses: andstor/file-existence-action@v3 with: - files: "/home/runner/work/vplanet/vplanet/junit/test-results.xml" + files: "${{ github.workspace }}/junit/test-results.xml" fail: true From 0f9f5fb2c9ff8ba6cd0e905fdc88fef4caee716b Mon Sep 17 00:00:00 2001 From: Rory Barnes Date: Wed, 4 Sep 2024 14:17:45 -0700 Subject: [PATCH 9/9] Removed macos 11 from list of OSes. It takes to long for GitHub to find those runners! --- .github/workflows/tests-macos-intel.yml | 2 +- tests/Atmesc/HydELimConstXUVLopez12/planet.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-macos-intel.yml b/.github/workflows/tests-macos-intel.yml index ebd51b9dc..7aba41dcc 100644 --- a/.github/workflows/tests-macos-intel.yml +++ b/.github/workflows/tests-macos-intel.yml @@ -10,7 +10,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-11, macos-12, macos-13] + os: [macos-12, macos-13] python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] fail-fast: false steps: diff --git a/tests/Atmesc/HydELimConstXUVLopez12/planet.in b/tests/Atmesc/HydELimConstXUVLopez12/planet.in index 31f79211b..eb9d4f8d9 100644 --- a/tests/Atmesc/HydELimConstXUVLopez12/planet.in +++ b/tests/Atmesc/HydELimConstXUVLopez12/planet.in @@ -8,7 +8,7 @@ dRadGyra 0.4 # Radius of gyration; ang. mom. coeff. dAge 1.0e6 # Age [yr] # ATMESC Parameters -dFXUV -100 # Incident XUV flux (constant) +dFXUV -100 # Incident XUV flux (constant) dXFrac 1.0 # X-Ray/XUV absorption radius in planet radii dAtmXAbsEffH 0.1 # H X-ray/XUV absorption efficiency (epsilon) dSurfWaterMass 0.0 # Initial water mass, negative -> Earth oceans