Migrate Use Open WebUI with MAX to Pixi #192
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 | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**/*.md' | |
| - '**/*.png' | |
| - '**/*.jpg' | |
| - '**/*.jpeg' | |
| - '**/*.gif' | |
| - 'LICENSE' | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**/*.md' | |
| - '**/*.png' | |
| - '**/*.jpg' | |
| - '**/*.jpeg' | |
| - '**/*.gif' | |
| - 'LICENSE' | |
| jobs: | |
| validate-and-test: | |
| name: Validate and Test | |
| runs-on: ubuntu-latest | |
| container: | |
| image: amd64/ubuntu:latest | |
| steps: | |
| - name: Install prerequisites | |
| run: | | |
| apt-get update | |
| apt-get install -y curl git | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: prefix-dev/setup-pixi@v0.8.8 | |
| with: | |
| pixi-version: v0.47.0 | |
| cache: false | |
| post-cleanup: false | |
| - name: Run Metadata Validation | |
| shell: bash | |
| run: | | |
| pixi run lint | |
| - name: Get changed directories | |
| id: changed-dirs | |
| run: | | |
| if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| # For PR, use origin/main as base | |
| CHANGED_DIRS=$(git diff --name-only origin/main..HEAD | grep -v '^\.github/' | cut -d'/' -f1 | sort -u | tr '\n' ' ') | |
| else | |
| # For push, use the before commit if available, otherwise use HEAD~1 | |
| if [ -n "${{ github.event.before }}" ] && git cat-file -e "${{ github.event.before }}" 2>/dev/null; then | |
| CHANGED_DIRS=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -v '^\.github/' | cut -d'/' -f1 | sort -u | tr '\n' ' ') | |
| else | |
| CHANGED_DIRS=$(git diff --name-only HEAD~1..HEAD | grep -v '^\.github/' | cut -d'/' -f1 | sort -u | tr '\n' ' ') | |
| fi | |
| fi | |
| echo "Changed directories: $CHANGED_DIRS" | |
| echo "dirs=$CHANGED_DIRS" >> $GITHUB_OUTPUT | |
| - name: Run tests for changed directories | |
| if: steps.changed-dirs.outputs.dirs != '' | |
| run: | | |
| python scripts/run_tests.py ${{ steps.changed-dirs.outputs.dirs }} |