Skip to content

Commit 68de4c1

Browse files
committed
[run ci] this is a test DLR-AMR/try-dry-run-for-codecov
1 parent a5dc363 commit 68de4c1

File tree

1 file changed

+46
-31
lines changed

1 file changed

+46
-31
lines changed

.github/workflows/code_coverage.yml

Lines changed: 46 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -94,39 +94,54 @@ jobs:
9494
run: export CONFIG_OPTIONS="${TEST_LEVEL_FLAG} -DT8CODE_CODE_COVERAGE=ON -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake"
9595
&& echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV
9696
# cmake
97-
- name: echo cmake line
98-
run: echo cmake ../ $CONFIG_OPTIONS
99-
- name: cmake
100-
run: mkdir build && cd build && cmake ../ $CONFIG_OPTIONS
101-
- name: OnFailUploadLog
102-
if: failure()
103-
uses: actions/upload-artifact@v4
104-
with:
105-
name: cmake_${{ inputs.BUILD_TYPE }}_MPI_${{ inputs.MPI }}.log
106-
path: build/CMakeFiles/CMakeOutput.log
107-
- name: build
108-
run: cd build && cmake --build . $MAKEFLAGS
109-
- name: install
110-
run: cd build && cmake --install .
97+
# - name: echo cmake line
98+
# run: echo cmake ../ $CONFIG_OPTIONS
99+
# - name: cmake
100+
# run: mkdir build && cd build && cmake ../ $CONFIG_OPTIONS
101+
# - name: OnFailUploadLog
102+
# if: failure()
103+
# uses: actions/upload-artifact@v4
104+
# with:
105+
# name: cmake_${{ inputs.BUILD_TYPE }}_MPI_${{ inputs.MPI }}.log
106+
# path: build/CMakeFiles/CMakeOutput.log
107+
# - name: build
108+
# run: cd build && cmake --build . $MAKEFLAGS
109+
# - name: install
110+
# run: cd build && cmake --install .
111111
# Generate code coverage report.
112-
- name: Generate code coverage report
113-
run: cd build && cmake --build . --target coverage
112+
# - name: Generate code coverage report
113+
# run: cd build && cmake --build . --target coverage
114114
# Upload coverage report to Codecov.
115-
- name: Upload coverage to Codecov
116-
if: (github.event_name == 'schedule' && github.repository == 'DLR-AMR/t8code')
117-
uses: codecov/codecov-action@v5
118-
with:
119-
files: ./build/coverage.info
120-
fail_ci_if_error: true
121-
disable_search: true
122-
token: ${{ secrets.CODE_COV }}
123-
- name: Coverage to Codecov (dry run)
115+
# - name: Upload coverage to Codecov (schedules)
116+
# if: (github.event_name == 'schedule' && github.repository == 'DLR-AMR/t8code')
117+
# uses: codecov/codecov-action@v5
118+
# with:
119+
# files: ./build/coverage.info
120+
# fail_ci_if_error: true
121+
# disable_search: true
122+
# token: ${{ secrets.CODE_COV }}
123+
- name: Get commit
124124
# if: (github.event_name == 'merge_group')
125-
uses: codecov/codecov-action@v5
125+
uses: actions/checkout@v4
126126
with:
127-
files: ./build/coverage.info
128-
dry_run: true
129-
fail_ci_if_error: true
130-
disable_search: true
131-
token: ${{ secrets.CODE_COV }}
127+
fetch-depth: 0
128+
run: |
129+
commit_hash=${{ github.sha }}
130+
echo "Commit hash: $commit_hash"
131+
commit_msg=$(git show -s --format=%B $commit_hash)
132+
echo "Commit message:"
133+
echo "$commit_msg"
134+
branch=$(echo "$commit_msg" | grep -oP '(?<=DLR-AMR/)[^\s]+')
135+
echo "branch: "
136+
echo "$branch"
137+
last_commit_hash=$(git rev-parse $branch)
138+
echo "$last_commit_hash"
139+
# - name: Coverage to Codecov
140+
# # if: (github.event_name == 'merge_group')
141+
# uses: codecov/codecov-action@v5
142+
# with:
143+
# files: ./build/coverage.info
144+
# fail_ci_if_error: true
145+
# disable_search: true
146+
# token: ${{ secrets.CODE_COV }}
132147

0 commit comments

Comments
 (0)