fix(ee): use set(ex=) instead of setex() for license cache updates #23980
Workflow file for this run
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: Python Checks | |
| concurrency: | |
| group: Python-Checks-${{ github.workflow }}-${{ github.head_ref || github.event.workflow_run.head_branch || github.run_id }} | |
| cancel-in-progress: true | |
| on: | |
| merge_group: | |
| pull_request: | |
| branches: | |
| - main | |
| - 'release/**' | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| permissions: | |
| contents: read | |
| jobs: | |
| mypy-check: | |
| # See https://runs-on.com/runners/linux/ | |
| # Note: Mypy seems quite optimized for x64 compared to arm64. | |
| # Similarly, mypy is single-threaded and incremental, so 2cpu is sufficient. | |
| runs-on: [runs-on, runner=2cpu-linux-x64, "run-id=${{ github.run_id }}-mypy-check", "extras=s3-cache"] | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: runs-on/action@cd2b598b0515d39d78c38a02d529db87d2196d1e # ratchet:runs-on/action@v2 | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Python and Install Dependencies | |
| uses: ./.github/actions/setup-python-and-install-dependencies | |
| with: | |
| requirements: | | |
| backend/requirements/default.txt | |
| backend/requirements/dev.txt | |
| backend/requirements/model_server.txt | |
| backend/requirements/ee.txt | |
| - name: Generate OpenAPI schema and Python client | |
| shell: bash | |
| run: | | |
| ods openapi all | |
| - name: Cache mypy cache | |
| if: ${{ vars.DISABLE_MYPY_CACHE != 'true' }} | |
| uses: runs-on/cache@50350ad4242587b6c8c2baa2e740b1bc11285ff4 # ratchet:runs-on/cache@v4 | |
| with: | |
| path: backend/.mypy_cache | |
| key: mypy-${{ runner.os }}-${{ github.base_ref || github.event.merge_group.base_ref || 'main' }}-${{ hashFiles('**/*.py', '**/*.pyi', 'backend/pyproject.toml') }} | |
| restore-keys: | | |
| mypy-${{ runner.os }}-${{ github.base_ref || github.event.merge_group.base_ref || 'main' }}- | |
| mypy-${{ runner.os }}- | |
| - name: Run MyPy | |
| working-directory: ./backend | |
| env: | |
| MYPY_FORCE_COLOR: 1 | |
| TERM: xterm-256color | |
| run: mypy . | |
| - name: Run MyPy (tools/) | |
| env: | |
| MYPY_FORCE_COLOR: 1 | |
| TERM: xterm-256color | |
| run: mypy tools/ |