Merge branch 'parfeniukink/features/build-automation' of github.com:n… #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | ||
name: Main Branch Workflow | ||
on: | ||
push: | ||
branches: [main] | ||
jobs: | ||
quality-checks: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: [ "3.9", "3.12" ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Install dependencies | ||
run: pip install tox | ||
- name: Run checks (quality, types, and pre-commit) | ||
run: | | ||
tox -e quality | ||
tox -e types | ||
pre-commit run --all-files | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: ["3.9", "3.12"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install tox | ||
- name: Run tests with coverage@85% (smoke, sanity, and regression) | ||
run: | | ||
python -m tox -e cov-unit | ||
integration-tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: ["3.9", "3.12"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install tox | ||
- name: Run tests (smoke) | ||
run: | | ||
python -m tox -e test-integration -- -m smoke | ||
publish: | ||
runs-on: ubuntu-latest | ||
uses: neuralmagic/nm-actions/actions/python-tox-release@main | ||
with: | ||
publish_pypi: false | ||
publish_nm_pypi: true | ||
build_type: nightly | ||
secrets: | ||
GCP_PROJECT: ${{ secrets.GCP_PROJECT }} | ||
GCP_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} | ||
GCP_NM_PYPI_SA: ${{ secrets.GCP_NM_PYPI_SA }} | ||
NM_PYPI_SA: ${{ secrets.NM_PYPI_SA }} | ||
PYPI_PUBLIC_USER: ${{ secrets.PYPI_PUBLIC_USER }} | ||
PYPI_PUBLIC_AUTH: ${{ secrets.PYPI_PUBLIC_AUTH }} |