diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 532c26e81..b61e44041 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -163,3 +163,23 @@ jobs: with: name: ${{ matrix.browser-channel }}-${{ matrix.os }} path: pw-log.txt + build-conda: + name: Conda Build + strategy: + fail-fast: false + matrix: + os: [ubuntu-20.04, macos-10.15, windows-2019] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Get conda + uses: conda-incubator/setup-miniconda@v2 + with: + python-version: 3.9 + channels: conda-forge + - name: Prepare + run: conda install conda-build conda-verify + - name: Build + run: conda build . diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 79bcc7166..cdf558af1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,5 +1,6 @@ name: Upload Python Package on: + workflow_dispatch: release: types: [published] jobs: @@ -23,3 +24,26 @@ jobs: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: twine upload dist/* + + deploy-conda: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Get conda + uses: conda-incubator/setup-miniconda@v2 + with: + python-version: 3.9 + channels: conda-forge + - name: Prepare + run: conda install anaconda-client conda-build conda-verify + - name: Build and Upload + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + run: | + conda config --set anaconda_upload yes + conda build --user microsoft . diff --git a/conda_build_config.yaml b/conda_build_config.yaml new file mode 100644 index 000000000..43a23503c --- /dev/null +++ b/conda_build_config.yaml @@ -0,0 +1,4 @@ +python: + - 3.7 + - 3.8 + - 3.9 diff --git a/meta.yaml b/meta.yaml new file mode 100644 index 000000000..cf9a7baac --- /dev/null +++ b/meta.yaml @@ -0,0 +1,53 @@ +package: + name: playwright + version: "{{ environ.get('GIT_DESCRIBE_TAG') }}" + +source: + path: . + +build: + number: 0 + script: "{{ PYTHON }} -m pip install . --no-deps -vv" + skip: true # [py<37] + binary_relocation: False + missing_dso_whitelist: "*" + entry_points: + - playwright = playwright.__main__:main + +requirements: + host: + - python + - wheel + - pip + - curl + - setuptools_scm + run: + - python + - greenlet >=0.4 + - pyee >=8.0.1 + - websockets >=8.1 + - typing_extensions # [py<39] +test: + requires: + - pip + imports: + - playwright + - playwright.sync_api + - playwright.async_api + commands: + - pip check + - playwright --help + +about: + home: https://github.com/microsoft/playwright-python + license: Apache-2.0 + license_family: Apache + license_file: LICENSE + summary: Python version of the Playwright testing and automation library. + description: | + Playwright is a Python library to automate Chromium, + Firefox and WebKit browsers with a single API. Playwright + delivers automation that is ever-green, capable, reliable + and fast. + doc_url: https://playwright.dev/python/docs/intro/ + dev_url: https://github.com/microsoft/playwright-python