Skip to content

Fix JSON format

Fix JSON format #3132

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Apex CI/CD
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install dependencies
run: |
source $HOME/.cargo/env
uv pip install '.[dev]' --system
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "12.22.9"
- name: Debug Environment
run: |
python -V
which python
pip list
# Style/format checks.
- name: Run Ruff (linter)
run: |
ruff check --diff .
- name: Run Ruff (formatter)
run: |
ruff format --check --diff .
- name: Run mypy for type checking
run: |
mypy .
- name: Test with pytest
run: |
pytest tests/ --verbose --failed-first --exitfirst --disable-warnings
# - name: Generate coverage report
# run: |
# pytest --cov=apex/ --cov-report=xml tests/
#
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# files: ./coverage.xml
# fail_ci_if_error: true
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-pip-