Fixes to mache.deploy #762
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: CI/CD Build Workflow | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| env: | |
| CANCEL_OTHERS: false | |
| PATHS_IGNORE: '["**/README.md", "**/docs/**"]' | |
| # Static python version for setting up pre-commit linting | |
| PYTHON_VERSION: "3.14" | |
| jobs: | |
| pre-commit-hooks: | |
| name: lint with pre-commit | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - id: skip_check | |
| uses: fkirc/skip-duplicate-actions@master | |
| with: | |
| cancel_others: ${{ env.CANCEL_OTHERS }} | |
| paths_ignore: ${{ env.PATHS_IGNORE }} | |
| - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} | |
| name: Checkout Code Repository | |
| uses: actions/checkout@v6 | |
| - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} | |
| name: Set up Python ${{ env.PYTHON_VERSION }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} | |
| id: file_changes | |
| uses: trilom/file-changes-action@1.2.4 | |
| with: | |
| output: ' ' | |
| - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} | |
| # Run all pre-commit hooks on all the files. | |
| # Getting only staged files can be tricky in case a new PR is opened | |
| # since the action is run on a branch in detached head state | |
| name: Install and Run Pre-commit | |
| uses: pre-commit/action@v3.0.1 | |
| with: | |
| extra_args: --files ${{ steps.file_changes.outputs.files}} | |
| build: | |
| name: test mache - python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| strategy: | |
| matrix: | |
| include: | |
| - python-version: "3.10" | |
| pixi-env: py310 | |
| - python-version: "3.11" | |
| pixi-env: py311 | |
| - python-version: "3.12" | |
| pixi-env: py312 | |
| - python-version: "3.13" | |
| pixi-env: py313 | |
| - python-version: "3.14" | |
| pixi-env: py314 | |
| fail-fast: false | |
| steps: | |
| - id: skip_check | |
| uses: fkirc/skip-duplicate-actions@master | |
| with: | |
| cancel_others: ${{ env.CANCEL_OTHERS }} | |
| paths_ignore: ${{ env.PATHS_IGNORE }} | |
| - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} | |
| uses: actions/checkout@v6 | |
| - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} | |
| name: Set up Pixi | |
| uses: prefix-dev/setup-pixi@v0.9.4 | |
| with: | |
| pixi-version: v0.62.2 | |
| # Project environment caching uses pixi.lock as the cache key input. | |
| # If you don't commit a lockfile, disable caching to avoid ENOENT. | |
| cache: ${{ hashFiles('pixi.lock') != '' }} | |
| environments: ${{ matrix.pixi-env }} | |
| - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} | |
| name: Install mache | |
| run: | | |
| pixi run -e ${{ matrix.pixi-env }} python -m pip install --no-deps --no-build-isolation -vv -e . | |
| - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} | |
| name: Run Tests | |
| env: | |
| CHECK_IMAGES: False | |
| run: | | |
| set -e | |
| pixi run -e ${{ matrix.pixi-env }} pip check | |
| pixi run -e ${{ matrix.pixi-env }} mache sync diags --help | |
| pixi run -e ${{ matrix.pixi-env }} pytest tests | |
| - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} | |
| name: Build Sphinx Docs | |
| run: | | |
| pixi run -e ${{ matrix.pixi-env }} bash -e -c "cd docs && DOCS_VERSION=test make versioned-html" | |
| workflow-tests: | |
| name: workflow tests - python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| matrix: | |
| include: | |
| - python-version: "3.10" | |
| pixi-env: py310 | |
| workflow-path: workflow_tests/test_deploy_workflow.py | |
| - python-version: "3.14" | |
| pixi-env: py314 | |
| workflow-path: workflow_tests | |
| fail-fast: false | |
| steps: | |
| - id: skip_check | |
| uses: fkirc/skip-duplicate-actions@master | |
| with: | |
| cancel_others: ${{ env.CANCEL_OTHERS }} | |
| paths_ignore: ${{ env.PATHS_IGNORE }} | |
| - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} | |
| uses: actions/checkout@v6 | |
| - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} | |
| name: Set up Pixi | |
| uses: prefix-dev/setup-pixi@v0.9.4 | |
| with: | |
| pixi-version: v0.62.2 | |
| cache: ${{ hashFiles('pixi.lock') != '' }} | |
| environments: ${{ matrix.pixi-env }} | |
| - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} | |
| name: Install mache | |
| run: | | |
| pixi run -e ${{ matrix.pixi-env }} python -m pip install --no-deps --no-build-isolation -vv -e . | |
| - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} | |
| name: Run workflow tests | |
| run: | | |
| pixi run -e ${{ matrix.pixi-env }} pytest ${{ matrix.workflow-path }} |