Merge latest state #1
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 (smoke and sanity) | ||
run: | | ||
python -m tox -e test-unit -- -m "smoke or sanity" | ||
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: dev | ||
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 }} |