diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 05d1a3c..44edf62 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -16,9 +16,11 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] - python-version: [3.9] - requires: ["oldest", "latest"] + os: ["ubuntu-latest", "macOS-latest", "windows-latest"] + python-version: ["3.9", "3.12"] + requires: ["latest"] + include: + - { os: "ubuntu-20.04", python-version: "3.9", requires: "oldest" } # Timeout: https://stackoverflow.com/a/59076067/4521646 timeout-minutes: 35 @@ -31,31 +33,13 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - # Github Actions: Run step on specific OS: https://stackoverflow.com/a/57948488/4521646 - #- name: Setup macOS - # if: runner.os == 'macOS' - # run: | - # brew install libomp # https://github.com/pytorch/pytorch/issues/20030 + cache: "pip" - name: Set min. dependencies if: matrix.requires == 'oldest' run: | - for fpath in ('requirements.txt', '_requirements/test.txt'): - req = open(fpath).read().replace('>=', '==') - open(fpath, 'w').write(req) - shell: python - - - name: Get pip cache dir - id: pip-cache - run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - - - name: Cache pip - uses: actions/cache@v4 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-pip-${{ hashFiles('requirements.txt') }} - restore-keys: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-pip- + pip install 'lightning-utilities[cli]' + python -m lightning_utilities.cli requirements set-oldest --req_files='["requirements.txt"]' - name: Install package & dependencies run: |