Skip to content

Commit

Permalink
fix: use virtual environment for CI actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 committed Oct 9, 2024
1 parent cc8ac43 commit ebf0286
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: python3 -m pip install tox
run: pipx install tox
- name: Run linters
run: tox run -e lint

Expand All @@ -50,7 +50,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: python3 -m pip install tox
run: pipx install tox
- name: Run tests
run: tox run -e unit

Expand All @@ -61,7 +61,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: python3 -m pip install tox
run: pipx install tox
- name: Run tests
run: tox run -e type

Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/nightly-TICS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
- name: Install requirements
run: |
python3 -m pip install tox pylint flake8
python3 -m pip install --requirement test-requirements.txt
sudo apt update -y
sudo apt install python3-venv -y
- name: Create and activate virtual environment
run: |
python3 -m venv .venv
. .venv/bin/activate
pip install tox pylint flake8
pip install --requirement test-requirements.txt
echo PATH=$PATH >> $GITHUB_ENV
- name: Run coverage tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
- name: Select charmhub channel
uses: canonical/charming-actions/[email protected]
id: channel
- name: Install dependencies
run: python3 -m pip install tox
- name: Install tox
run: pipx install tox
- name: Stage charm
run: tox run -e stage -- ${{ matrix.charm }} --clean
- name: Upload charm to charmhub
Expand Down

0 comments on commit ebf0286

Please sign in to comment.