Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update action.yml to cache pip dependencies #87

Merged
merged 1 commit into from
Jun 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,17 @@ runs:
ref: ${{ github.head_ref || github.ref }}
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: "pip" # caching pip dependencies

- name: Install Dependencies
# tomli required for codespell with pyproject.toml
# Note tomli required for codespell with pyproject.toml
if: github.event.action != 'closed'
run: |
pip install --no-cache -q \
pip install -q \
ruff docformatter codespell tomli \
mdformat-gfm mdformat-frontmatter mdformat-mkdocs
shell: bash
Expand Down Expand Up @@ -167,11 +173,10 @@ runs:
OPENAI_AZURE_API_KEY: ${{ inputs.openai_azure_api_key }}
OPENAI_AZURE_ENDPOINT: ${{ inputs.openai_azure_endpoint }}
OPENAI_MODEL: ${{ inputs.openai_model }}
# Note file must be run remotely, not with "python utils/run_pr_summary.py"
run: |
pip install --no-cache -q openai
# python utils/run_pr_summary.py
curl -o run_pr_summary.py "https://github.com/raw/ultralytics/actions/main/utils/run_pr_summary.py"
python run_pr_summary.py
pip install -q openai
curl -s "https://github.com/raw/ultralytics/actions/main/utils/run_pr_summary.py" | python -
shell: bash
continue-on-error: true

Expand Down
Loading