Skip to content

Commit

Permalink
use powershell to manage py venv
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Dec 7, 2023
1 parent b48cbb1 commit 046369b
Showing 1 changed file with 33 additions and 31 deletions.
64 changes: 33 additions & 31 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,39 +136,41 @@ runs:
fi
- name: Setup python venv
shell: bash
shell: pwsh
run: |
${{ steps.setup-python.outputs.python-path }} -m venv "$GITHUB_ACTION_PATH/venv"
if [[ "${{ runner.os }}" == "macOS" || "${{ runner.os }}" == "Linux" ]]; then
source "$GITHUB_ACTION_PATH/venv/bin/activate"
else
"$GITHUB_ACTION_PATH/venv/Scripts/activate"
fi
pip install -r "$GITHUB_ACTION_PATH/requirements.txt"
${{ steps.setup-python.outputs.python-path }} -m venv "$env:GITHUB_ACTION_PATH/venv"
if ("${{ runner.os }}" -ceq "macOS" -or "${{ runner.os }}" -ceq "Linux") {
source "$env:GITHUB_ACTION_PATH/venv/bin/activate"
}
else {
"$env:GITHUB_ACTION_PATH/venv/Scripts/activate"
}
pip install -r "$env:GITHUB_ACTION_PATH/requirements.txt"
clang-tools -i ${{ inputs.version }} -b
- name: Run cpp-linter
id: cpp-linter
shell: bash
run: |
if [[ "${{ runner.os }}" == "macOS" || "${{ runner.os }}" == "Linux" ]]; then
source "$GITHUB_ACTION_PATH/venv/bin/activate"
else
"$GITHUB_ACTION_PATH/venv/Scripts/activate"
fi
cpp-linter \
--style="${{ inputs.style }}" \
--extensions=${{ inputs.extensions }} \
--tidy-checks="${{ inputs.tidy-checks }}" \
--repo-root=${{ inputs.repo-root }} \
--version=${{ inputs.version }} \
--verbosity=${{ inputs.verbosity }} \
--lines-changed-only=${{ inputs.lines-changed-only }} \
--files-changed-only=${{ inputs.files-changed-only }} \
--thread-comments=${{ inputs.thread-comments }} \
--no-lgtm=${{ inputs.no-lgtm }} \
--step-summary=${{ inputs.step-summary }} \
--ignore="${{ inputs.ignore }}" \
--database=${{ inputs.database }} \
--file-annotations=${{ inputs.file-annotations }} \
--extra-arg="${{ inputs.extra-args }}"
shell: pwsh
run: >-
if ("${{ runner.os }}" -ceq "macOS" -or "${{ runner.os }}" -ceq "Linux") {
source "$env:GITHUB_ACTION_PATH/venv/bin/activate"
}
else {
"$env:GITHUB_ACTION_PATH/venv/Scripts/activate"
}
cpp-linter
--style="${{ inputs.style }}"
--extensions=${{ inputs.extensions }}
--tidy-checks="${{ inputs.tidy-checks }}"
--repo-root=${{ inputs.repo-root }}
--version=${{ inputs.version }}
--verbosity=${{ inputs.verbosity }}
--lines-changed-only=${{ inputs.lines-changed-only }}
--files-changed-only=${{ inputs.files-changed-only }}
--thread-comments=${{ inputs.thread-comments }}
--no-lgtm=${{ inputs.no-lgtm }}
--step-summary=${{ inputs.step-summary }}
--ignore="${{ inputs.ignore }}"
--database=${{ inputs.database }}
--file-annotations=${{ inputs.file-annotations }}
--extra-arg="${{ inputs.extra-args }}"

0 comments on commit 046369b

Please sign in to comment.