Skip to content

Commit

Permalink
split testing and publishing for two actions
Browse files Browse the repository at this point in the history
it is made to force publishing only if pyproject.toml changed
  • Loading branch information
mrtedn21 committed Nov 14, 2023
1 parent 1831769 commit 0c7c5c3
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
name: Test Coverage
name: Publishing

on: ["push", "pull_request"]
on:
push:
paths:
- pyproject.toml
pull_request:
paths:
- pyproject.toml

jobs:
test_and_publish:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -21,12 +27,6 @@ jobs:
python -m pip install poetry
python -m poetry install
- name: Run pytest
run: |
PYTHONPATH=$(pwd)
export PYTHONPATH
poetry run pytest
- name: Build
run: poetry build

Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Testing

on: ["push", "pull_request"]

jobs:
test_and_publish:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@master
- name: set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
python -m poetry install
- name: Run pytest
run: |
PYTHONPATH=$(pwd)
export PYTHONPATH
poetry run pytest
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "martin-eden"
version = "0.9.8"
version = "0.9.9"
description = "async backend framework on sockets"
authors = ["mrtedn21 <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 0c7c5c3

Please sign in to comment.