From 8d1926444a150ce3346048ddc43828c64ffc06b9 Mon Sep 17 00:00:00 2001 From: Zerohertz Date: Thu, 31 Oct 2024 23:13:46 +0900 Subject: [PATCH] :ship: test: pip cache --- .github/workflows/cicd-pr-dev-master.yaml | 41 +++-------------------- 1 file changed, 4 insertions(+), 37 deletions(-) diff --git a/.github/workflows/cicd-pr-dev-master.yaml b/.github/workflows/cicd-pr-dev-master.yaml index 9c699261..723d0d75 100644 --- a/.github/workflows/cicd-pr-dev-master.yaml +++ b/.github/workflows/cicd-pr-dev-master.yaml @@ -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 @@ -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 @@ -152,14 +135,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: Run tests env: @@ -167,7 +143,6 @@ jobs: 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 @@ -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: | @@ -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