diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23a5cc9ca..96bc4744d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,7 @@ on: push: branches: [ master ] pull_request: + branches: [ master ] workflow_dispatch: schedule: - cron: '0 0 1 * *' @@ -19,10 +20,14 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] python: ['3.9', '3.10', '3.11', '3.12'] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} + cache: 'pip' + cache-dependency-path: | + '../**/requirements*.txt' + '../**/setup.py' - run: python -m pip install --upgrade setuptools pip tox virtualenv # Run tox only for the installed py version on the runner as outlined in the python matrix # Ensures the correct py version is installed and tested as opposed to 'tox' which attempts to run for all py versions in tox.ini diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 4b2291e39..ae7ee2036 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -17,10 +17,14 @@ jobs: os: [ubuntu-latest, macos-latest] python: ['3.9', '3.10', '3.11', '3.12'] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} + cache: 'pip' + cache-dependency-path: | + '../**/requirements*.txt' + '../**/setup.py' - run: python -m pip install --upgrade setuptools pip tox virtualenv # Run tox only for the installed py version on the runner as outlined in the python matrix # Ensures the correct py version is installed and tested as opposed to 'tox' which attempts to run for all py versions in tox.ini @@ -32,11 +36,15 @@ jobs: needs: tox runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.8 + cache: 'pip' + cache-dependency-path: | + '../**/requirements*.txt' + '../**/setup.py' - name: Install dependencies run: pip install wheel - name: Build package