ENT-11346: Added the 'cfbs render-input' command #1197
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
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: Python tests | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| - name: Build distributions | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install uv | |
| uv lock --check | |
| uv build | |
| - name: Upload dists as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dists | |
| path: dist/ | |
| test: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv and sync dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install uv | |
| echo "${{ matrix.python-version }}" > .python-version | |
| uv lock --check | |
| uv sync | |
| - name: Lint with flake8 | |
| run: | | |
| uv run flake8 cfbs/ tests/ --extend-exclude=tests/tmp --ignore=E203,W503,E722,E731 --max-complexity=100 --max-line-length=160 | |
| - name: Lint with pyright (type checking) | |
| run: | | |
| uv tool run pyright cfbs --pythonversion ${{ matrix.python-version }} | |
| - name: Test with pytest | |
| run: | | |
| uv run pytest | |
| - name: Install | |
| run: | | |
| uv build | |
| pip install dist/cfbs-*.whl | |
| - name: Run bash tests | |
| run: | | |
| UNSAFE_TESTS=1 bash tests/shell/all.sh | |
| test-legacy: | |
| runs-on: ubuntu-24.04 | |
| needs: build | |
| permissions: | |
| contents: read | |
| env: | |
| # Temporary workaround for Python 3.5 failures - May 2024, see CFE-4395 | |
| PIP_TRUSTED_HOST: "pypi.python.org pypi.org files.pythonhosted.org" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.5.10", "3.6.15", "3.7.10"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| - name: Install Pyright | |
| run: | | |
| npm install -g pyright | |
| - name: Set up legacy Python ${{ matrix.python-version }} | |
| uses: ./.github/actions/set-up-legacy-python | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Lint with flake8 | |
| run: | | |
| python -m flake8 . --ignore=E203,W503,E722,E731 --max-complexity=100 --max-line-length=160 | |
| - name: Lint with pyright (type checking) | |
| run: | | |
| pyright cfbs --pythonversion ${{ matrix.python-version }} | |
| - name: Test with pytest | |
| run: | | |
| python -m pytest | |
| - name: Retrieve dists built on modern Python | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: dists | |
| path: dist/ | |
| - name: Install | |
| run: | | |
| pip install dist/cfbs-*.whl | |
| - name: Run bash tests | |
| run: | | |
| UNSAFE_TESTS=1 bash tests/shell/all.sh |