name: Pull Request # Trigger mega-linter at every push to main. Action will also be visible from Pull on: push: branches: - main pull_request: branches: - main concurrency: group: python-pr-test-${{ github.ref }}-${{ github.workflow }} cancel-in-progress: true permissions: {} jobs: python-ci: name: Python CI runs-on: ubuntu-latest defaults: run: shell: bash strategy: matrix: python-version: - "3.11" - "3.12" steps: # Git Checkout - name: Checkout Code uses: actions/checkout@v4 with: # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to # improve performance fetch-depth: 0 persist-credentials: false - uses: pdm-project/setup-pdm@v4 with: python-version: ${{ matrix.python-version }} cache: true cache-dependency-path: python/pdm.lock - name: Setup dify-plugin-cli run: ./scripts/setup-dify-plugin-cli.sh # setup uv and get uv path to env - name: Install uv run: | curl -LsSf https://astral.sh/uv/install.sh | sh echo "UV_PATH=$(which uv)" >> $GITHUB_ENV - name: Install dependencies run: ./python/scripts/install-deps.sh - name: Run linter run: ./python/scripts/lint.sh - name: Launch mock server run: ./python/scripts/launch_mock_server.sh & - name: Run tests run: ./python/scripts/test.sh