From f3720771f9ed9722ed49a6f4835f2738dac6385e Mon Sep 17 00:00:00 2001 From: "alex.oleshkevich" Date: Tue, 27 Feb 2024 19:25:06 +0100 Subject: [PATCH] debug package builder --- .github/workflows/lint_and_test.yml | 11 ++++++----- .github/workflows/publish.yml | 28 ++++++++++------------------ pyproject.toml | 4 ++-- 3 files changed, 18 insertions(+), 25 deletions(-) diff --git a/.github/workflows/lint_and_test.yml b/.github/workflows/lint_and_test.yml index 27ae7ab..323c225 100644 --- a/.github/workflows/lint_and_test.yml +++ b/.github/workflows/lint_and_test.yml @@ -15,22 +15,22 @@ jobs: python-version: [ '3.10', '3.11' ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Run pre-commit - uses: pre-commit/action@v3.0.0 + uses: pre-commit/action@v3 unit_tests: runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python-version: [ '3.10', '3.11' ] + python-version: [ '3.10', '3.11', '3.12' ] steps: - uses: actions/checkout@v3 @@ -38,6 +38,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: + cache: 'pip' python-version: ${{ matrix.python-version }} - name: Cache poetry @@ -58,7 +59,7 @@ jobs: run: pytest --cov ./ --cov-report xml --cov-report term-missing - name: Upload coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./coverage.xml verbose: true diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c79bcbd..b221516 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,6 +4,7 @@ name: Upload Python Package on: + push: release: types: [ created ] @@ -12,41 +13,32 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.x' + python-version: '3.12' + cache: 'pip' - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: v21 + cache: 'npm' registry-url: https://registry.npmjs.org/ - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v3 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: ${{ runner.os }}-yarn- - - name: Install javascript dependencies run: yarn install working-directory: assets - name: Build assets - run: yarn build + run: npm run build - name: Install python dependencies run: | python -m pip install --upgrade pip poetry poetry config virtualenvs.create false - poetry install --no-interaction + poetry install --no-interaction --only main - name: Build package run: | diff --git a/pyproject.toml b/pyproject.toml index f2b7caf..835d0ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,9 +27,9 @@ python = "^3.10" Jinja2 = "^3" starlette = "*" tabler-icons = "*" -python-slugify = "^7.0" +python-slugify = "^8.0" WTForms = "^3" -python-multipart = "^0.0.5" +python-multipart = "^0.0.9" starlette-babel = "*" starlette-flash = "*"