name: Hydrogram on: [push, pull_request] jobs: build: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest] python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install the latest version of rye uses: eifinger/setup-rye@v4 id: setup-rye with: enable-cache: true cache-prefix: ${{ matrix.python-version }} - name: Pin python-version ${{ matrix.python-version }} if: steps.setup-rye.outputs.cache-hit != 'true' run: rye pin ${{ matrix.python-version }} - name: Install dependencies if: steps.setup-rye.outputs.cache-hit != 'true' run: | rye sync - name: Generate API run: | rye run api - name: Run tests run: | rye run python -m pytest