Skip to content

Commit

Permalink
adjust workflows to new setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Schneider committed Nov 18, 2021
1 parent 2678c60 commit 2aeff5a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 26 deletions.
34 changes: 15 additions & 19 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# This workflow runs the build, lints, and tests

name: Python package
name: CI

on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
workflow_dispatch:

jobs:
build:
Expand All @@ -19,7 +18,6 @@ jobs:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8]
poetry-version: [1.1.11]

steps:
- uses: actions/checkout@v2
Expand All @@ -28,20 +26,18 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

# set up latest version of poetry
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}

# install dependencies and project
- name: Install dependencies & project
run: |
poetry install --no-interaction
- name: Linting & Testing
- name: Install mobile-env and additional dependencies
run: |
poetry run flake8 mobile_env --per-file-ignores="__init__.py:F401"
poetry run pytest tests/
sudo apt update -y
# sudo apt install ffmpeg imagemagick
python -m pip install --upgrade pip
pip install .
pip install -r requirements_tests.txt
- name: Lint with flake8
run: |
flake8 mobile_env --per-file-ignores="__init__.py:F401"
- name: Run tests with pytest
run: |
pytest
14 changes: 8 additions & 6 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Publish
name: PyPI

on:
release:
types: [created]
workflow_dispatch:

jobs:
deploy:
Expand All @@ -18,10 +19,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
poetry version $(git describe --tags --abbrev=0)
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish --build
python setup.py sdist bdist_wheel
twine upload dist/*
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The simplest option is to install the latest release of `mobile-env` from PyPI u
```bash
pip install mobile-env
```
This is recommended for most users.
This is recommended for most users. mobile-env is tested on Ubuntu, Windows, and MacOS.

### From Source (Development)

Expand Down

0 comments on commit 2aeff5a

Please sign in to comment.