Skip to content

Commit

Permalink
devops: Adding conda recipe (microsoft#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
owenlamont committed Jul 25, 2023
1 parent 7f73ece commit bea0eda
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,23 @@ jobs:
- name: Test on Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: xvfb-run pytest --cov=pytest_playwright --cov-report xml
build-conda:
name: Conda Build
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
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 . -c microsoft -c conda-forge
23 changes: 23 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,26 @@ jobs:
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
deploy-conda:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
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 . -c microsoft -c conda-forge
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ dmypy.json
# End of https://www.toptal.com/developers/gitignore/api/python
.vscode

# Jetbrains IDEs
.idea

_repo_version.py
.DS_Store
/test-results/
5 changes: 5 additions & 0 deletions conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
python:
- 3.8
- 3.9
- "3.10"
- "3.11"
37 changes: 37 additions & 0 deletions meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package:
name: "pytest-playwright"
version: "{{ environ.get('GIT_DESCRIBE_TAG') | replace('v', '') }}"

source:
path: .

build:
number: 0
noarch: python
script: "{{ PYTHON }} -m pip install . --no-deps -vv"

requirements:
host:
- python >=3.8
- setuptools-scm
- pip
run:
- python >=3.8
- playwright >=v1.33.0
- pytest >=6.2.4,<8.0.0
- pytest-base-url >=1.0.0,<3.0.0
- python-slugify >=6.0.0,<9.0.0

test:
imports:
- pytest_playwright
commands:
- pip check
requires:
- pip

about:
home: https://github.com/microsoft/playwright-pytest
summary: A pytest wrapper with fixtures for Playwright to automate web browsers
license: Apache-2.0
license_file: LICENSE

0 comments on commit bea0eda

Please sign in to comment.