diff --git a/.github/workflows/check-code.yml b/.github/workflows/check-code.yml index f628c5fa..0faa07db 100644 --- a/.github/workflows/check-code.yml +++ b/.github/workflows/check-code.yml @@ -19,6 +19,9 @@ jobs: python-tests: # The type of runner that the job will run on runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9.x", "3.10.x", "3.11.x", "3.12.x"] # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -27,17 +30,20 @@ jobs: # uses: styfle/cancel-workflow-action@0.9.0 # with: # access_token: ${{ github.token }} + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + # You can test your matrix by printing the current Python version + - name: Show Python version + run: python -c "import sys; print(sys.version)" # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Check out Repository uses: actions/checkout@v3 - # We now test with Python 3.10 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10.9' - # Runs a set of commands using the runners shell - name: Set up Path run: echo "$HOME/.local/bin" >> $GITHUB_PATH @@ -55,9 +61,6 @@ jobs: - name: Install Python Packages run: pip install -r requirements.txt - - name: Check Python Version - run: python --version - - name: Code run: make -k code