Skip to content

Commit

Permalink
update app build to poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
3ll3d00d committed May 22, 2023
1 parent 529dbb3 commit 0355781
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 305 deletions.
91 changes: 59 additions & 32 deletions .github/workflows/create-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,33 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install project
run: poetry install --no-interaction
- name: pytest
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv install -d
PYTHONPATH=. pipenv run pytest --cov=./ezbeq --cov-report=xml
source .venv/bin/activate
pytest --cov=./ezbeq --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
- name: Generate changelog
id: changelog
uses: metcalfc/changelog-generator@v4.0.1
Expand Down Expand Up @@ -54,30 +71,33 @@ jobs:
- name: Build UI
working-directory: ./ui
run: yarn build
- name: Copy UI to Server
run: |
rm -Rf ezbeq/ui
mv ui/build ezbeq/ui
- name: Get latest release version number
id: get_version
uses: battila7/get-version-action@v2
- name: Set version
run: |
echo ${{ steps.get_version.outputs.version-without-v }} > ezbeq/VERSION
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pip install wheel
pipenv install -d
pip list
pipenv run pip list
python-version: 3.9
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install project
run: poetry install --no-interaction
- name: Build dist
run: python setup.py sdist bdist_wheel
run: poetry build
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down Expand Up @@ -109,22 +129,29 @@ jobs:
- name: Set version
run: |
echo ${{ steps.get_version.outputs.version-without-v }} > ezbeq/VERSION
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv --python 3.8 install -d
pipenv run pip install pyinstaller
pip list
pipenv run pip list
python-version: 3.9
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --with exe --no-interaction --no-root
- name: Install project
run: poetry install --with exe --no-interaction
- name: Create distribution
id: create_dist
run: |
pipenv run pyinstaller --clean --log-level=INFO ezbeq.spec
poetry run pyinstaller --clean --log-level=INFO ezbeq.spec
if [[ "$RUNNER_OS" == "macOS" ]]
then
pushd dist
Expand Down
Loading

0 comments on commit 0355781

Please sign in to comment.