Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/codescan_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,49 @@ on:
pull_request:
branches:
- main
jobs:
codescan_ci:
// AI FIX START
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"]

steps:
- name: Check out code
uses: actions/checkout@v4

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

- name: Install dependencies
run: |
pip install build
pip install -r requirements.txt
pip install -r requirements_ci.txt

- name: Enforce proper code formatting with isort
run: |
isort --profile=black --check-only core/ core_tests/

- name: Check linting with pylint
run: |
pylint core/

- name: Run tests with unittest
run: |
python -m unittest discover -s core_tests -p "*.py"

- name: Build the project
run: |
python -m build
// AI FIX END

jobs:
codescan_ci:
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,48 +18,43 @@ jobs:
uses: googleapis/release-please-action@v4
id: release
with:
release-type: python

release-type: python
publish-to-testpypi:
// AI FIX START
needs: release
runs-on: ubuntu-latest
if: ${{ needs.release.outputs.release_created }}
permissions:
contents: read
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install dependencies
run: |
pip install build twine

- name: Build the package
run: |
python -m build

- name: Publish to TestPyPI
run: |
twine upload --repository testpypi dist/*
env:
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

publish-to-pypi:
// AI FIX END
needs: publish-to-testpypi
runs-on: ubuntu-latest
if: ${{ needs.publish-to-testpypi.result == 'success' }}
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Python
Expand Down
Loading