diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b802beb..a9a8a58 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,10 +1,10 @@ version: 2 updates: - - package-ecosystem: "pip" + - package-ecosystem: github-actions directory: "/" schedule: - interval: "monthly" - - package-ecosystem: "github-actions" + interval: monthly + - package-ecosystem: pip directory: "/" schedule: - interval: "monthly" + interval: monthly diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5b5c3a3..4eab997 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -12,26 +12,25 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -env: - PYTHON_VERSION: "3.11" - jobs: ci: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Setup Python ${{ env.PYTHON_VERSION }} + - name: Setup Python uses: actions/setup-python@v5 + id: cp + with: + python-version: '3.x' + - name: Cache pip dependencies + uses: actions/cache@v4 + id: cache-py + if: ${{ contains(runner.name, 'GitHub Actions') }} with: - python-version: ${{ env.PYTHON_VERSION }} - - name: Restore Python virtualenv - uses: syphar/restore-virtualenv@v1 - id: cache-virtualenv - - name: Download Pip cache - uses: syphar/restore-pip-download-cache@v1 - if: steps.cache-virtualenv.outputs.cache-hit != 'true' - - name: Install Python dependencies if cache miss + path: ${{ env.pythonLocation }} + key: ${{ runner.os }}-pip-${{ steps.cp.outputs.python-version }}-${{ hashFiles('requirements.txt') }} + - name: Install pip dependencies if cache miss + if: ${{ steps.cache-py.outputs.cache-hit != 'true' }} run: pip install -r requirements.txt - if: steps.cache-virtualenv.outputs.cache-hit != 'true' - name: Run Test run: python smalltest.py