name: pystan

on: [push, pull_request]

jobs:
  tests:
    name: pystan tests
    timeout-minutes: 20
    runs-on: ${{ matrix.runs-on }}
    strategy:
      matrix:
        include:
          - {runs-on: ubuntu-20.04, python-version: "3.8"}
          - {runs-on: ubuntu-20.04, python-version: "3.9"}
          - {runs-on: ubuntu-22.04, python-version: "3.10"}
          - {runs-on: macos-11, python-version: "3.8"}
          - {runs-on: macos-11, python-version: "3.9"}
          - {runs-on: macos-11, python-version: "3.10"}
    steps:
      - name: Check out repository
        uses: actions/checkout@v2

      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install poetry
        run: pip install "poetry~=1.1.4"

      # export test dependencies from pyproject.toml, install them
      - name: Install dependencies
        run: |
          poetry export -f requirements.txt --without-hashes --dev -o requirements.txt \
          && pip install -r requirements.txt

      - name: Build and Install wheel
        run: |
          poetry build -v
          python -m pip install dist/*.whl

      - name: Check code
        run: scripts/check

      - name: Run tests
        run: scripts/test

name: pystan

on: [push, pull_request]

jobs:
  tests:
    name: pystan tests
    timeout-minutes: 30
    runs-on: ${{ matrix.runs-on }}
    strategy:
      matrix:
        include:
          - {runs-on: ubuntu-20.04, python-version: "3.8"}
          - {runs-on: ubuntu-20.04, python-version: "3.9"}
          - {runs-on: ubuntu-22.04, python-version: "3.10"}
          - {runs-on: macos-11, python-version: "3.8"}
          - {runs-on: macos-11, python-version: "3.9"}
          - {runs-on: macos-11, python-version: "3.10"}
    steps:
      - name: Check out repository
        uses: actions/checkout@v3

      - name: Set up Python
        uses: actions/setup-python@v3
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install poetry
        run: pip install "poetry~=1.1.4"

      # export test dependencies from pyproject.toml, install them
      - name: Install dependencies
        run: |
          poetry export -f requirements.txt --without-hashes --dev -o requirements.txt \
          && pip install -r requirements.txt

      - name: Build and Install wheel
        run: |
          poetry build -v
          python -m pip install dist/*.whl

      - name: Check code
        run: scripts/check

      - name: Run tests
        run: scripts/test

Update actions versions, increase timeout
ci: Update actions versions, increase timeout
