diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 48a55aa4..68d7627c 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -1,7 +1,4 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Python application +name: PyReduce application on: push: @@ -12,14 +9,25 @@ on: jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.9, 3.10, 3.11, 3.12] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 + - name: Set up Python + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: ${{ matrix.python-version }} + + - name: Cache Python dependencies + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- - name: Install dependencies run: | @@ -43,7 +51,7 @@ jobs: needs: [build] if: github.event_name == 'push' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: GitHub Tag id: tag_release