From b8f056aff75188cad0006a64d945c3054af2d036 Mon Sep 17 00:00:00 2001 From: lbonaldo Date: Mon, 16 Oct 2023 18:47:18 -0400 Subject: [PATCH] Update GH workflow --- .github/workflows/ci.yml | 13 +++++++++---- Project.toml | 2 +- test/Logs/Electrolyzer.log | 4 ---- test/Logs/MethodofMorris.log | 4 ---- test/Logs/MultiStage.log | 3 --- test/Logs/PiecewiseFuel_CO2.log | 4 ---- test/Logs/VREStor.log | 4 ---- 7 files changed, 10 insertions(+), 24 deletions(-) delete mode 100644 test/Logs/Electrolyzer.log delete mode 100644 test/Logs/MethodofMorris.log delete mode 100644 test/Logs/MultiStage.log delete mode 100644 test/Logs/PiecewiseFuel_CO2.log delete mode 100644 test/Logs/VREStor.log diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 743ed87fc9..0c9dbd9e6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,12 +17,12 @@ jobs: - "1.6" # LTS (64-bit Linux) - "1.7" - "1.8" - - '1' # latest stable 1.x Julia release (Linux) + - '1.9' # latest stable Julia release (Linux) os: - ubuntu-latest arch: - x64 - include: # additional tests [Julia-nightly] + include: # additional tests [Julia-nightly] (Linux) - os: ubuntu-latest version: 'nightly' arch: x64 @@ -33,16 +33,19 @@ jobs: run: | git checkout -b ${GITHUB_REF#refs/heads/}-testlogs mkdir test/Logs; cd test/Logs + git config --global init.defaultBranch main git init git config --local user.name GenXProject git config --local user.email "84470580+GenXProject@users.noreply.github.com" - git remote add testlog https://github.com/GenXProject/GenX-testlog.git + git remote add testlog https://$LOG_TOKEN@github.com/GenXProject/GenX-testlog.git git pull testlog main if [ -d Logs_v${{ matrix.version }} ]; then mv Logs_v${{ matrix.version }}/*.log . else - mkdir Logs_v${{ matrix.version }} + mkdir Logs_v${{ matrix.version }} fi + env: + LOG_TOKEN: ${{ secrets.LOG_TOKEN }} - uses: julia-actions/setup-julia@v1 with: version: ${{ matrix.version }} @@ -52,9 +55,11 @@ jobs: - uses: julia-actions/julia-runtest@v1 - name: Commit logs and push back to repo run: | + cd ${GITHUB_WORKSPACE}/test/Logs mv *.log Logs_v${{ matrix.version }} git add -f Logs_v${{ matrix.version }} git commit -m "Update test logs for Julia v${{ matrix.version }}" + git pull --rebase testlog main # pull again to avoid conflicts from other versions git push testlog main env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Project.toml b/Project.toml index e9180b39fa..bfde4887a4 100644 --- a/Project.toml +++ b/Project.toml @@ -48,4 +48,4 @@ LoggingExtras = "e6f89c97-d47a-5376-807f-9c37f3926c36" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test", "Logging", "LoggingExtras", "JLD2"] +test = ["Test", "JLD2", "Logging", "LoggingExtras"] diff --git a/test/Logs/Electrolyzer.log b/test/Logs/Electrolyzer.log deleted file mode 100644 index 8f5798d275..0000000000 --- a/test/Logs/Electrolyzer.log +++ /dev/null @@ -1,4 +0,0 @@ -2023-10-11 02:37:37 | 6946.981912630803 ± 0.0001 | Test Passed - Expression: ≈(obj_test, obj_true, atol = optimal_tol) - Evaluated: ≈(6946.981912630803, 6946.9819126; atol = 0.0001) -2023-10-11 03:01:00 | 6946.981912630803 ± 0.0001 | Test Passed diff --git a/test/Logs/MethodofMorris.log b/test/Logs/MethodofMorris.log deleted file mode 100644 index dd23446d99..0000000000 --- a/test/Logs/MethodofMorris.log +++ /dev/null @@ -1,4 +0,0 @@ -2023-10-11 02:37:51 | Build and Run | Test Broken - Expression: built -2023-10-11 03:01:13 | Build and Run | Test Broken - Expression: built diff --git a/test/Logs/MultiStage.log b/test/Logs/MultiStage.log deleted file mode 100644 index 8f0ff0bb7e..0000000000 --- a/test/Logs/MultiStage.log +++ /dev/null @@ -1,3 +0,0 @@ -2023-10-11 02:38:03 | 79734.8003171703 ± 1.0e-5, 41630.03494225143 ± 1.0e-5, 27855.20631474678 ± 1.0e-5 | Test Passed - Expression: all(obj_true .- optimal_tol .<= obj_test .<= obj_true .+ optimal_tol) -2023-10-11 03:01:23 | 79734.80031717036 ± 1.0e-5, 41630.034942251485 ± 1.0e-5, 27855.206314746796 ± 1.0e-5 | Test Passed diff --git a/test/Logs/PiecewiseFuel_CO2.log b/test/Logs/PiecewiseFuel_CO2.log deleted file mode 100644 index 7466c75b06..0000000000 --- a/test/Logs/PiecewiseFuel_CO2.log +++ /dev/null @@ -1,4 +0,0 @@ -2023-10-11 02:36:57 | 2341.8230753008047 ± 1.0e-5 | Test Passed - Expression: ≈(obj_test, obj_true, atol = optimal_tol) - Evaluated: ≈(2341.8230753008047, 2341.8230753; atol = 1.0e-5) -2023-10-11 03:00:24 | 2341.8230753008047 ± 1.0e-5 | Test Passed diff --git a/test/Logs/VREStor.log b/test/Logs/VREStor.log deleted file mode 100644 index 0c4a88778e..0000000000 --- a/test/Logs/VREStor.log +++ /dev/null @@ -1,4 +0,0 @@ -2023-10-11 02:37:34 | 92081.91504226513 ± 1.0e-5 | Test Passed - Expression: ≈(obj_test, obj_true, atol = optimal_tol) - Evaluated: ≈(92081.91504226513, 92081.915042; atol = 1.0e-5) -2023-10-11 03:00:57 | 92081.91504226513 ± 1.0e-5 | Test Passed