Skip to content
Merged
Changes from 1 commit
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
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,22 @@ jobs:
python -m pip install -v ".[dev]"
mypy neat_ml
ruff check neat_ml
- name: install fonts
- name: cache fonts
id: cache-fonts
if: runner.os == 'Linux'
uses: actions/cache@v5

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is best practice to use the hash rather than the release tag for security reasons (tags are often mutable), followed by a short comment with the tag/version number.

As an example of how to do this, see pandas CI config here:
https://github.com/pandas-dev/pandas/blob/main/.github/workflows/wheels.yml#L70

The rest of this seems "ok" now.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I modified the cache fonts step to use the github/actions/cache hash instead of the version tag. I cloned the github actions repo and checked out v5.0.5 to find the commit hash associated with the version.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As noted during in person conversation, I didnt check that the version tag and hash number were aligned in the CI file. I have updated the comment to reference the correct tag (v5.0.5).

with:
path: /usr/share/fonts/truetype/msttcorefonts/
key: ${{ runner.os }}-msttcorefonts-v1
- name: install fonts
if: runner.os == 'Linux' && steps.cache-fonts.outputs.cache-hit != 'true'
run: |
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt-get update
sudo apt-get install -y ttf-mscorefonts-installer || true
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Outdated
sudo fc-cache -f -v
- name: refresh font cache
if: runner.os == 'Linux'
run: sudo fc-cache -f -v
- name: test
run: |
cd /tmp && python -m pytest --pyargs neat_ml --cov=neat_ml --cov-report=term-missing
Loading