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

fix: pre-commit ci workflow #3917

Merged
merged 8 commits into from
Oct 15, 2024
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
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ jobs:
lsblk -l
echo "sda rotational = $(cat /sys/block/sda/queue/rotational)"
echo "sdb rotational = $(cat /sys/block/sdb/queue/rotational)"
- name: Create virtual environment
Copy link
Collaborator

Choose a reason for hiding this comment

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

I meant that you need to change the current Install dependencies step line 22 to run in virtual env

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep yep, I was distracted with the gh runner 😛

run: python -m venv venv
- name: Activate virtual environment
run: |
echo "Activating virtual environment"
source venv/bin/activate
python -m pip install --upgrade pip
- name: Install dependencies
run: |
source venv/bin/activate
pip install pre-commit
Copy link
Collaborator

Choose a reason for hiding this comment

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

why again?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because among different run commands you need to source again

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(I am testing this not 100% sure about this)

- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
Expand Down
Loading