Skip to content

Commit

Permalink
🚢 test: pip cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Zerohertz committed Oct 31, 2024
1 parent 5fc95c8 commit 8d19264
Showing 1 changed file with 4 additions and 37 deletions.
41 changes: 4 additions & 37 deletions .github/workflows/cicd-pr-dev-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,10 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Cache virtualenv
uses: actions/cache@v4
with:
path: venv
key: ${{ runner.os }}-python-venv
restore-keys: |
${{ runner.os }}-python-venv-
cache: "pip"

- name: Install dependencies
run: |
python -m venv venv
source venv/bin/activate
pip uninstall zerohertzLib -y
pip install .'[all]' --no-cache-dir
Expand Down Expand Up @@ -111,18 +102,10 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Cache virtualenv
uses: actions/cache@v4
with:
path: venv
key: ${{ runner.os }}-python-venv
restore-keys: |
${{ runner.os }}-python-venv-
cache: "pip"

- name: Lint code
run: |
source venv/bin/activate
pip install -r requirements/requirements-style.txt
black --check .
flake8 zerohertzLib
Expand Down Expand Up @@ -152,22 +135,14 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Cache virtualenv
uses: actions/cache@v4
with:
path: venv
key: ${{ runner.os }}-python-venv
restore-keys: |
${{ runner.os }}-python-venv-
cache: "pip"

- name: Run tests
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
run: |
source venv/bin/activate
sudo apt update
sudo apt install python3-opencv -y
pip install pytest pytest-cov
Expand Down Expand Up @@ -210,14 +185,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Cache virtualenv
uses: actions/cache@v4
with:
path: venv
key: ${{ runner.os }}-python-venv
restore-keys: |
${{ runner.os }}-python-venv-
cache: "pip"

- name: Align with latest branch
run: |
Expand All @@ -236,7 +204,6 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
source venv/bin/activate
sudo apt update
sudo apt install build-essential -y
pip install -r requirements/requirements-docs.txt
Expand Down

0 comments on commit 8d19264

Please sign in to comment.