Skip to content

Commit 7ae8aca

Browse files
committed
chore(TECHOPS-18898): fix pipeline
1 parent fd64f61 commit 7ae8aca

3 files changed

Lines changed: 94 additions & 38 deletions

File tree

.github/workflows/release-test.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
1-
name: Test Release
1+
name: Test
22

3+
<<<<<<< HEAD
4+
on: [workflow_call]
5+
=======
36
on:
47
pull_request:
58
branches:
69
- master
710
workflow_call:
11+
>>>>>>> fd64f611d32e0bc6c8129fa9dd8b365163996c79
812

913
jobs:
10-
test:
11-
runs-on: large-spot
12-
steps:
13-
- uses: actions/checkout@v4
14+
test:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
1418

19+
<<<<<<< HEAD
20+
- name: Set up Python 3.10
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.10'
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
python -m pip install -r requirements.txt
29+
python -m pip install pytest pytest-asyncio
30+
=======
1531
- name: Set up Python 3.10
1632
uses: actions/setup-python@v5
1733
with:
@@ -31,6 +47,7 @@ jobs:
3147
run: |
3248
python -m build
3349
python -m pip install -e .
50+
>>>>>>> fd64f611d32e0bc6c8129fa9dd8b365163996c79
3451

35-
- name: Run tests
36-
run: python -m pytest test/model_unit_test.py
52+
- name: Run tests
53+
run: python -m pytest test/ -v

.github/workflows/release.yml

Lines changed: 66 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,75 @@
1-
name: Release
1+
name: Main Pipeline
22

33
on:
4+
pull_request:
5+
branches: [master]
46
push:
5-
branches:
6-
- master
7+
branches: [master]
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
712

813
jobs:
14+
test:
15+
if: github.event_name == 'pull_request'
16+
uses: ./.github/workflows/release-test.yml
917

10-
test:
11-
uses: ./.github/workflows/release-test.yml
18+
release-please:
19+
if: github.event_name == 'push'
20+
uses: circlefin/circle-public-github-workflows/.github/workflows/conventional-commit-release.yaml@main
21+
with:
22+
release_type: python
23+
additional_unqualified_tags: true
24+
extra_tags: stable
25+
secrets:
26+
RELEASE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1227

13-
release:
14-
name: Release
15-
runs-on: large-spot
16-
needs: test
17-
steps:
18-
- uses: actions/checkout@v4
19-
20-
- name: Set up Python
21-
uses: actions/setup-python@v5
22-
with:
23-
python-version: '3.10'
24-
25-
- name: Install build dependencies
26-
run: |
27-
python -m pip install --upgrade pip
28-
python -m pip install build twine
29-
30-
- name: Build package
31-
run: python -m build
28+
pypi-publish:
29+
name: Publish to PyPI
30+
if: needs.release-please.outputs.release_created == 'true'
31+
needs: release-please
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Set up Python
37+
uses: actions/setup-python@v5
38+
with:
39+
python-version: '3.10'
3240

33-
- name: Check distribution
34-
run: twine check dist/*
41+
- name: Install build dependencies
42+
run: |
43+
python -m pip install --upgrade pip
44+
python -m pip install build twine
3545
36-
- name: Publish to PyPI
37-
env:
38-
TWINE_USERNAME: __token__
39-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
40-
run: twine upload dist/*
46+
- name: Build package
47+
run: python -m build
48+
49+
- name: Check distribution
50+
run: twine check dist/*
51+
52+
- name: Publish to PyPI
53+
env:
54+
TWINE_USERNAME: __token__
55+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
56+
run: twine upload dist/*
57+
58+
- name: Upload build artifacts for release
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: python-package-distributions
62+
path: dist/
63+
64+
github-release:
65+
name: Create GitHub Release with Assets
66+
if: needs.release-please.outputs.release_created == 'true'
67+
needs: [release-please, pypi-publish]
68+
uses: circlefin/circle-public-github-workflows/.github/workflows/attach-release-assets.yaml@main
69+
with:
70+
release_tag: ${{ needs.release-please.outputs.release_tag }}
71+
artifact_file_globs: |
72+
*.whl
73+
*.tar.gz
74+
create_manifest: true
75+
generate_sbom: true

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
python-dotenv
2+
<<<<<<< HEAD
3+
openai
4+
=======
5+
>>>>>>> fd64f611d32e0bc6c8129fa9dd8b365163996c79
26
openai-agents==0.2.6

0 commit comments

Comments
 (0)