fix(core,proxy,audit,cli): improve robustness and validation #2045
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: Install pkg | |
| # see: https://help.github.com/en/actions/reference/events-that-trigger-workflows | |
| on: # Trigger the workflow on push or pull request, but only for the main branch | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| pkg-check: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ["3.9", "3.14"] | |
| fail-fast: false | |
| uses: ./.github/workflows/_create-pkg.yml | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| os: ${{ matrix.os }} | |
| artifact-name: ci-packages-${{ matrix.os }}-${{ matrix.python-version }}-${{ github.sha }} | |
| pkg-install: | |
| needs: pkg-check | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ["3.9", "3.14"] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: 🔀 Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6 | |
| - name: 🐍 Set up Python | |
| uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: 📥 Download artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: ci-packages-${{ matrix.os }}-${{ matrix.python-version }}-${{ github.sha }} | |
| path: dist | |
| - name: 📋 Show packages | |
| working-directory: dist | |
| run: | | |
| ls | |
| pip -V | |
| echo "PKG_WHEEL=$(ls *.whl | head -n1)" >> $GITHUB_ENV | |
| echo "PKG_SOURCE=$(ls *.tar.gz | head -n1)" >> $GITHUB_ENV | |
| pip list | |
| - name: 📦 Install and check package (wheel) | |
| working-directory: dist | |
| run: | | |
| pip install '${{ env.PKG_WHEEL }}' --force-reinstall | |
| pip list | |
| python -c "import deprecate as pkg; print(f'version: {pkg.__version__}')" | |
| - name: 📦 Install and check package (sdist) | |
| working-directory: dist | |
| run: | | |
| pip install '${{ env.PKG_SOURCE }}' --force-reinstall | |
| pip list | |
| python -c "import deprecate as pkg; print(f'version: {pkg.__version__}')" | |
| install-guardian: | |
| runs-on: ubuntu-latest | |
| needs: pkg-install | |
| if: always() | |
| steps: | |
| - run: echo "${{ needs.pkg-install.result }}" | |
| - name: ❌ Failing... | |
| if: needs.pkg-install.result == 'failure' | |
| run: exit 1 | |
| - name: ⏭️ Cancelled or skipped... | |
| if: contains(fromJSON('["cancelled", "skipped"]'), needs.pkg-install.result) | |
| timeout-minutes: 1 | |
| run: sleep 90 |