Skip to content

Commit

Permalink
Update action.yml to cache pip dependencies (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Jun 8, 2024
1 parent cc6e0c2 commit 39815b3
Showing 1 changed file with 11 additions and 6 deletions.
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

0 comments on commit 39815b3

Please sign in to comment.