Needed for some dependencies. #665
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Mocket's CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| schedule: | |
| # cron every week on monday | |
| - cron: "0 0 * * 1" | |
| # Cancel in-progress jobs when pushing to the same branch. | |
| concurrency: | |
| cancel-in-progress: true | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14', 'pypy3.11'] | |
| env: | |
| # Configure a constant location for the uv cache | |
| UV_CACHE_DIR: /tmp/.uv-cache | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Restore uv cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: /tmp/.uv-cache | |
| key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
| restore-keys: | | |
| uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
| uv-${{ runner.os }} | |
| - uses: hoverkraft-tech/compose-action@v2.0.2 | |
| with: | |
| compose-file: "./docker-compose.yml" | |
| down-flags: "--remove-orphans" | |
| up-flags: "--no-start" | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update && sudo apt-get -y install python3-dev | |
| make develop | |
| make services-up | |
| - name: Test | |
| run: | | |
| make test | |
| make services-down | |
| - name: Minimize uv cache | |
| run: uv cache prune --ci | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |