Skip to content

Commit

Permalink
debug package builder
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-oleshkevich committed Feb 27, 2024
1 parent 291ac5e commit f372077
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 25 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/lint_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,30 @@ 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

- name: Set up Python
uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: ${{ matrix.python-version }}

- name: Cache poetry
Expand All @@ -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
Expand Down
28 changes: 10 additions & 18 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
name: Upload Python Package

on:
push:
release:
types: [ created ]

Expand All @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "*"

Expand Down

0 comments on commit f372077

Please sign in to comment.