From 5491aa2605f9c4262411ebc241dcee82abec4bf0 Mon Sep 17 00:00:00 2001 From: Algiane Froehly Date: Thu, 11 Apr 2024 16:50:14 +0200 Subject: [PATCH] Further tests. --- .github/workflows/code-cov.yml | 33 ++++++++++++++++++++++------- .github/workflows/code-coverage.yml | 29 +++++++++++++++++++++++++ .github/workflows/main-job.yml | 2 +- 3 files changed, 55 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/code-coverage.yml diff --git a/.github/workflows/code-cov.yml b/.github/workflows/code-cov.yml index 3d0ab1c71..eb1b761a9 100644 --- a/.github/workflows/code-cov.yml +++ b/.github/workflows/code-cov.yml @@ -1,12 +1,29 @@ -name: Code coverage - on: - # run tests on push events - push: - # run tests on PR events - pull_request: - types: [opened, synchronize] + workflow_call: + inputs: + cmake_build_type: + description: 'Value for CMAKE_BUILD_TYPE' + type: string + default: Release + required: true + + add_cmake_cfg_args: + description: 'Additional arguments for configuration step' + required: false + type: string + + branch_name: + description: 'Branch to checkout when tests are manually triggered' + required: false + type: string + + code_coverage: + description: 'Code coverage' + required: false + default: true + type: boolean +# job jobs: ci: if: "! contains(github.event.head_commit.message, '[skip ci]')" @@ -347,7 +364,7 @@ jobs: # build/TEST_OUTPUTS - name: Upload coverage to Codecov - #if: inputs.CODE_COVERAGE + #if: matrix.os == 'ubuntu-20.04' uses: codecov/codecov-action@v4 with: fail_ci_if_error: true diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml new file mode 100644 index 000000000..fee0c536e --- /dev/null +++ b/.github/workflows/code-coverage.yml @@ -0,0 +1,29 @@ +name: Long tests + +on: + # run tests on push events + push: + # run tests on PR events + pull_request: + types: [opened, synchronize] + + # run tests manually on a given branch (default is master) + workflow_dispatch: + # Inputs the workflow accepts. + inputs: + branch: + # branch to test + description: 'branch to test' + # Default value if no value is explicitly provided + default: 'master' + required: false + +# job +jobs: + mmg-debug: + uses: ./.github/workflows/code-cov.yml + with: + cmake_build_type: RelWithAssert + add_cmake_cfg_args: -D VERY_SHORT_TESTS=ON + branch_name: ${{github.event.inputs.branch}} + code_coverage: true diff --git a/.github/workflows/main-job.yml b/.github/workflows/main-job.yml index d78e06622..f6ad39448 100644 --- a/.github/workflows/main-job.yml +++ b/.github/workflows/main-job.yml @@ -322,7 +322,7 @@ jobs: -DTEST_LIBMMGS=ON \ -DTEST_LIBMMG2D=ON \ -DTEST_LIBMMG3D=ON \ - ${{ inputs.add_cmake_cfg_args }} + -DONLY_VERY_SHORT_TESTS=ON shell: bash - name: Build Mmg