Skip to content

Commit

Permalink
Merge pull request #10 from i-dot-ai/EN-623/ci_rework
Browse files Browse the repository at this point in the history
EN-623 - Split test and publish jobs
  • Loading branch information
RyanWhite25 authored Oct 17, 2024
2 parents 99b8f1d + 699d235 commit 163c272
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:

jobs:
test:
test-code:
runs-on: "macos-latest"
steps:
- name: Checkout code
Expand All @@ -27,14 +27,36 @@ jobs:
run: |
bash scripts/test.sh --ci
test-publish:
if: github.ref_name == github.event.repository.default_branch
runs-on: ubuntu-latest
needs:
- test-code
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install poetry
run: pipx install poetry

- name: Setup Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "poetry"

- name: Install dependencies
run: |
poetry env use "3.12"
poetry install
- name: Bump version number
run: poetry version 0.0.0

- name: Build package
run: poetry build

- name: Publish to test pypi
if: github.ref_name == github.event.repository.default_branch
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: 'https://test.pypi.org/legacy/'

0 comments on commit 163c272

Please sign in to comment.