Skip to content

feat(job): support semanticModel job run / start / run-status commands #4

feat(job): support semanticModel job run / start / run-status commands

feat(job): support semanticModel job run / start / run-status commands #4

Workflow file for this run

name: fab:build
on:
pull_request:
branches:
- main
permissions:
contents: read
jobs:
# Linting Job
lint:
name: Lint Code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12" # Use any stable Python version for linting
- name: Install Tox
run: |
python -m pip install --upgrade pip
pip install tox
- name: Cache Tox environments
uses: actions/cache@v3
with:
path: .tox
key: ${{ runner.os }}-tox-lint-${{ hashFiles('**/tox.toml') }}
restore-keys: |
${{ runner.os }}-tox-lint-
- name: Run Linting
run: tox -e lint
# Type Checking Job
type-check:
name: Type Check Code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12" # Use any stable Python version for type checking
- name: Install Tox
run: |
python -m pip install --upgrade pip
pip install tox
- name: Cache Tox environments
uses: actions/cache@v3
with:
path: .tox
key: ${{ runner.os }}-tox-type-${{ hashFiles('**/tox.toml') }}
restore-keys: |
${{ runner.os }}-tox-type-
- name: Run Type Checks
run: tox -e type
# Testing Jobs with Matrix Strategy
test:
name: Test on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: "3.10"
tox-env: "py310"
- python-version: "3.11"
tox-env: "py311"
- python-version: "3.12"
tox-env: "py312"
- python-version: "3.13"
tox-env: "py313"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Tox
run: |
python -m pip install --upgrade pip
pip install tox
- name: Cache Tox environments
uses: actions/cache@v3
with:
path: .tox
key: ${{ runner.os }}-tox-${{ matrix.tox-env }}-${{ hashFiles('**/tox.toml') }}
restore-keys: |
${{ runner.os }}-tox-${{ matrix.tox-env }}-
${{ runner.os }}-tox-
- name: Run Tests
run: tox -e ${{ matrix.tox-env }}
# Upload the coverage report as an artifact
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-html-report-${{ matrix.python-version }}
path: coverage_html
# Build Job
build:
name: Build Package
runs-on: ubuntu-latest
needs:
- test # Ensure all test jobs complete successfully
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build