diff --git a/.github/actions/regression-tests/action.yml b/.github/actions/regression-tests/action.yml index 2d3d03f2c..fb80ff8b7 100644 --- a/.github/actions/regression-tests/action.yml +++ b/.github/actions/regression-tests/action.yml @@ -6,7 +6,7 @@ inputs: required: true type: string gspace-secret: - required: true + required: false type: string run-only-on-ubuntu-latest: # 'true' or 'false' cause boolean @@ -16,6 +16,9 @@ inputs: build-folder-name: required: true type: string + filter: + required: false + type: string runs: using: "composite" @@ -33,7 +36,7 @@ runs: export DRAGONFLY_PATH="${GITHUB_WORKSPACE}/${{inputs.build-folder-name}}/${{inputs.dfly-executable}}" export UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 # to crash on errors - pytest --json-report --json-report-file=report.json -svr dragonfly --ignore=dragonfly/replication_test.py + pytest -m "${{inputs.filter}}" --json-report --json-report-file=report.json -svr dragonfly --ignore=dragonfly/replication_test.py - name: Run PyTests replication test if: ${{ inputs.run-only-on-ubuntu-latest == 'false' || matrix.runner == 'ubuntu-latest' }} @@ -44,8 +47,8 @@ runs: # used by PyTests export DRAGONFLY_PATH="${GITHUB_WORKSPACE}/${{inputs.build-folder-name}}/${{inputs.dfly-executable}}" - pytest --json-report --json-report-file=rep1_report.json -sv dragonfly/replication_test.py --df alsologtostderr --df enable_multi_shard_sync=true - pytest --json-report --json-report-file=rep2_report.json -sv dragonfly/replication_test.py --df alsologtostderr --df enable_multi_shard_sync=false + pytest -m "${{inputs.filter}}" --json-report --json-report-file=rep1_report.json -sv dragonfly/replication_test.py --df alsologtostderr --df enable_multi_shard_sync=true + pytest -m "${{inputs.filter}}" --json-report --json-report-file=rep2_report.json -sv dragonfly/replication_test.py --df alsologtostderr --df enable_multi_shard_sync=false - name: Send notification on failure if: failure() && github.ref == 'refs/heads/main' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 031bc0f02..cb6a47c2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,12 +37,12 @@ jobs: # Test of these containers container: ["ubuntu-dev:20", "alpine-dev:latest"] build-type: [Debug, Release] - compiler: [{cxx: g++, c: gcc}] + compiler: [{ cxx: g++, c: gcc }] cxx_flags: ["-Werror"] include: - container: "alpine-dev:latest" build-type: Debug - compiler: {cxx: clang++, c: clang} + compiler: { cxx: clang++, c: clang } cxx_flags: "" timeout-minutes: 60 env: @@ -65,7 +65,7 @@ jobs: run: | uname -a cmake --version - mkdir -p ${{github.workspace}}/build + mkdir -p ${GITHUB_WORKSPACE}/build - name: Run sccache-cache uses: mozilla-actions/sccache-action@v0.0.3 @@ -81,7 +81,7 @@ jobs: # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: | - cmake -B ${{github.workspace}}/build \ + cmake -B ${GITHUB_WORKSPACE}/build \ -DCMAKE_BUILD_TYPE=${{matrix.build-type}} \ -GNinja \ -DCMAKE_C_COMPILER="${{matrix.compiler.c}}" \ @@ -89,17 +89,17 @@ jobs: -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache \ -DCMAKE_CXX_FLAGS="${{matrix.cxx_flags}}" \ -L - cd ${{github.workspace}}/build && pwd + cd ${GITHUB_WORKSPACE}/build && pwd du -hcs _deps/ - name: Build run: | - cd ${{github.workspace}}/build + cd ${GITHUB_WORKSPACE}/build ninja src/all ${SCCACHE_PATH} --show-stats | tee $GITHUB_STEP_SUMMARY - - name: Test + - name: C++ Unit Tests run: | - cd ${{github.workspace}}/build + cd ${GITHUB_WORKSPACE}/build echo Run ctest -V -L DFLY #GLOG_logtostderr=1 GLOG_vmodule=transaction=1,engine_shard_set=1 GLOG_logtostderr=1 GLOG_vmodule=rdb_load=1,rdb_save=1,snapshot=1 ctest -V -L DFLY @@ -117,6 +117,14 @@ jobs: ./multi_test --multi_exec_mode=1 ./multi_test --multi_exec_mode=3 # GLOG_logtostderr=1 GLOG_vmodule=transaction=1,engine_shard_set=1 CTEST_OUTPUT_ON_FAILURE=1 ninja server/test + - name: Run regression tests + if: matrix.container == 'ubuntu-dev:20' + uses: ./.github/actions/regression-tests + with: + dfly-executable: dragonfly + run-only-on-ubuntu-latest: true + build-folder-name: build + filter: "not slow" - name: Upload cache log uses: actions/upload-artifact@v3 with: @@ -136,7 +144,7 @@ jobs: - uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: "3.9" check-latest: true - name: Chart Rendering Tests