diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml index 13b3e1ecb88..f31513c5d6b 100644 --- a/.github/workflows/pr-test.yml +++ b/.github/workflows/pr-test.yml @@ -91,15 +91,25 @@ jobs: # list all dependencies to get a better view about installed package versions pipenv run pip list - pipenv run pip install redefine --index-url https://pip.redefine.dev + - name: Get venv path + id: get-venv + run: | + echo "venv=$(pipenv --venv)" >> "$GITHUB_OUTPUT" + + - name: Run Redefine.dev + uses: redefinedev/redefine-action@main + with: + auth: ${{ secrets.REDEFINE_AUTH }} + python-venv-path: ${{ steps.get-venv.outputs.venv }} + testing-framework: pytest + # mode is "discover" if github.ref is "refs/heads/main" otherwise it's the value of inputs.redefine-mode + mode: discover + config-args: matrix_value=${{ matrix.python }} + - name: Unit tests env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - REDEFINE_AUTH: ${{ secrets.REDEFINE_AUTH }} - run: | - pipenv run redefine config set stable_branch=main matrix_value=${{ matrix.python }} - pipenv run redefine start --pytest --discover - pipenv run python -m pytest tests + run: pipenv run python -m pytest tests integration-tests: strategy: @@ -268,7 +278,7 @@ jobs: # remove venv, if exists pipenv --rm || true pipenv --python ${{ env.PYTHON_VERSION }} - # 'py' package is used in 'pytest-benchmark', but 'pytest' removed it in their latest version + # 'py' package is used in 'pytest-benchmark', but 'pytest' removed it in their latest version pipenv run pip install pytest pytest-benchmark py pipenv run python setup.py sdist bdist_wheel bash -c 'pipenv run pip install dist/checkov-*.whl' @@ -322,7 +332,7 @@ jobs: run: | # remove venv, if exists pipenv --rm || true - pipenv --python ${{ env.PYTHON_VERSION }} + pipenv --python ${{ env.PYTHON_VERSION }} pipenv run pip install pytest pytest-xdist pipenv run python setup.py sdist bdist_wheel bash -c 'pipenv run pip install dist/checkov-*.whl'