diff --git a/.github/workflows/codescan_ci.yml b/.github/workflows/codescan_ci.yml index d886a6b..76d1544 100644 --- a/.github/workflows/codescan_ci.yml +++ b/.github/workflows/codescan_ci.yml @@ -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: diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 3de1345..14211e5 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -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