Skip to content

Commit

Permalink
Merge pull request #814 from google/py-check-package-add-with-uv
Browse files Browse the repository at this point in the history
python: check that published package works with uv add
  • Loading branch information
reyammer authored Nov 21, 2024
2 parents ffb3299 + 900db1b commit 906afc8
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/python-test-published-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
schedule:
- cron: '42 4 * * *' # Run daily
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/python-test-published-package.yml'

permissions:
contents: read
Expand All @@ -22,13 +25,18 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4

- name: Setup Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # pin@v5
with:
python-version: '${{ matrix.python-version }}'

- name: Install magika
# uv's oneline below does not work on windows; uv add magika==0.5.1 is known to not work with python 3.8 and 3.9
- if: matrix.os != 'windows-latest' && matrix.python-version != '3.8' && matrix.python-version != '3.9'
name: Install uv
run: curl -LsSf https://astral.sh/uv/0.4.7/install.sh | sh
- if: matrix.os != 'windows-latest' && matrix.python-version != '3.8' && matrix.python-version != '3.9'
name: Check that magika can be installed with uv
run: mkdir /tmp/test-uv && cd /tmp/test-uv && uv init && uv add magika && cd - && rm -rf /tmp/test-uv
- name: Install magika with pip
run: python3 -m pip install magika
- run: python3 -c 'import magika; m = magika.Magika(); print(m)'
- run: magika --version
Expand Down

0 comments on commit 906afc8

Please sign in to comment.