Feature rye (#17)

Migrate from Poetry to Rye 
Adaptat github actions 
Group build targets in makefile
This commit is contained in:
Yax 2023-11-11 19:45:35 +01:00 committed by GitHub
parent b57c4f1ae6
commit 6d53fdecac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 208 additions and 1203 deletions

View file

@ -3,21 +3,22 @@ on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
build_docker:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.10.13]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11.0"
- name: Install poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.2.2
- name: Install dependencies
run: poetry install
- name: Build project
run: poetry build
- name: Checkout code
uses: actions/checkout@v3
- name: Set up rye
uses: atu4403/setup-rye-multiOS@v1
- name: Sync dependencies using rye
run: |
rye pin ${{ matrix.python-version }}
rye sync
rye build --wheel --out dist
- name: Build the Docker image
run: |
echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin docker.io

View file

@ -2,13 +2,22 @@ name: pyinstaller
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
build_binary:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.10.13]
steps:
- uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v3
- name: Set up rye
uses: atu4403/setup-rye-multiOS@v1
- name: Sync dependencies using rye
run: |
rye pin ${{ matrix.python-version }}
rye sync
- name: Package application
uses: JackMcKew/pyinstaller-action-linux@python3.10
with:

View file

@ -2,30 +2,26 @@ name: pytest
on: push
jobs:
ci:
strategy:
fail-fast: false
matrix:
python-version: [3.11.0]
poetry-version: [1.2.2]
os: [ubuntu-latest, macos-latest, windows-latest]
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.10.13]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: poetry install
- name: Checkout code
uses: actions/checkout@v3
- name: Set up rye
uses: atu4403/setup-rye-multiOS@v1
- name: Sync dependencies using rye
run: |
rye pin ${{ matrix.python-version }}
rye sync
- name: Pytest and Coverage
run: |
poetry run coverage run -m --source=stacosys pytest tests
poetry run coverage report
rye run coverage run -m --source=stacosys pytest tests
rye run coverage report
- name: Send report to Coveralls
run: poetry run coveralls
run: rye run coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}