Skip to content

Commit

Permalink
chore: update actions to use virtualenv
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaakola-aiven committed Sep 25, 2024
1 parent aead524 commit 4de90f5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/container-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ jobs:
fetch-depth: 0

- name: Install requirements
run: pip install .
run: |
python -m venv venv
source ./venv/bin/activate
pip install .
- name: Resolve Karapace version
run: |
source ./venv/bin/activate
KARAPACE_VERSION=$(python -c "from karapace import version; print(version.__version__)")
echo KARAPACE_VERSION=$KARAPACE_VERSION >> $GITHUB_ENV
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,10 @@ jobs:
- name: Install libsnappy-dev
run: sudo apt install libsnappy-dev
- name: Install requirements and typing requirements
run: pip install .[typing]
- run: mypy
run: |
python -m venv venv
source ./venv/bin/activate
pip --require-virtualenv install .[typing]
- run: |
source ./venv/bin/activate
mypy src
13 changes: 10 additions & 3 deletions .github/workflows/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,19 @@ jobs:
- name: Install libsnappy-dev
run: sudo apt install libsnappy-dev
- name: Install requirements
run: pip install .
run: |
python -m venv venv
source ./venv/bin/activate
pip install .
# Compare with latest release when running on main.
- run: make schema against=$(git describe --abbrev=0 --tags)
- run: |
source ./venv/bin/activate
make schema against=$(git describe --abbrev=0 --tags)
if: github.ref == 'refs/heads/main'
# Compare with main when running on branches/PRs.
- run: make schema
- run: |
source ./venv/bin/activate
make schema
if: github.ref != 'refs/heads/main'
- run: |
diff=$(git --no-pager diff)
Expand Down

0 comments on commit 4de90f5

Please sign in to comment.