diff --git a/.env b/.env deleted file mode 100644 index 2251ad3..0000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -TASK_X_REMOTE_TASKFILES=1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81e675f..fe64835 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: "ci" +name: "CI" on: - push @@ -10,14 +10,15 @@ jobs: strategy: matrix: - os: [ ubuntu-latest, windows-latest, macos-latest ] + os: [ ubuntu-latest ] python-version: [ '3.10', '3.11', '3.12', '3.13' ] # Steps represent a sequence of tasks that will be executed as part of the job steps: - - name: Checkout [${{ github.repository }}] - uses: actions/checkout@v4 + - name: "Build the virtual environment for ${{ github.repository }}" + uses: cvxgrp/.github/actions/uv/environment@v2.1.0 - - uses: cvxgrp/.github/actions/uv/test@v2.0.8 + - uses: cvxgrp/.github/actions/test@v2.1.0 with: python-version: ${{ matrix.python-version }} + tests-folder: tests diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 41e7bf0..4366f02 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -7,31 +7,23 @@ jobs: test: runs-on: ubuntu-latest steps: - - name: Checkout [${{ github.repository }}] - uses: actions/checkout@v4 + - name: "Build the virtual environment for ${{ github.repository }}" + uses: cvxgrp/.github/actions/uv/environment@v2.1.1 - - uses: cvxgrp/.github/actions/uv/coverage@v2.0.8 - - - name: Coveralls GitHub Action - uses: coverallsapp/github-action@v2 - with: - files: artifacts/tests/coverage/coverage.info - format: lcov + - uses: cvxgrp/.github/actions/coverage@v2.1.1 deptry: runs-on: ubuntu-latest + steps: - - name: Checkout [${{ github.repository }}] - uses: actions/checkout@v4 + - name: "Build the virtual environment for ${{ github.repository }}" + uses: cvxgrp/.github/actions/uv/environment@v2.1.1 - - uses: cvxgrp/.github/actions/uv/deptry@v2.0.8 + - uses: cvxgrp/.github/actions/deptry@v2.1.1 + with: + source-folder: 'cvx' pre-commit: runs-on: ubuntu-latest steps: - - name: Checkout [${{ github.repository }}] - uses: actions/checkout@v4 - - - uses: pre-commit/action@v3.0.1 - with: - extra_args: '--verbose --all-files' + - uses: cvxgrp/.github/actions/pre-commit@v2.1.1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9abb474..b91e5c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,10 +12,11 @@ jobs: steps: - name: Generate Tag - uses: cvxgrp/.github/actions/uv/tag@v2.0.9 + uses: cvxgrp/.github/actions/tag@v2.1.1 with: github_token: ${{ secrets.GITHUB_TOKEN }} + publish: needs: tag runs-on: ubuntu-latest diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a838d2d --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +.DEFAULT_GOAL := help + +.PHONY: venv install fmt clean help test + +venv: + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv --python '3.12' + +install: venv ## Install dependencies and setup environment + uv pip install --upgrade pip + uv sync --dev --frozen + +fmt: venv ## Format and lint code + uv pip install pre-commit + uv run pre-commit install + uv run pre-commit run --all-files + +clean: ## Clean build artifacts and stale branches + git clean -X -d -f + git branch -v | grep "\[gone\]" | cut -f 3 -d ' ' | xargs git branch -D + +test: install ## Run tests + uv pip install pytest + uv run pytest tests + +help: ## Show this help message + @echo "Usage: make [target]" + @echo "" + @echo "Targets:" + @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-15s %s\n", $$1, $$2}' $(MAKEFILE_LIST) diff --git a/taskfile.yml b/taskfile.yml deleted file mode 100644 index a064490..0000000 --- a/taskfile.yml +++ /dev/null @@ -1,5 +0,0 @@ -version: '3' - -includes: - cvxcli: - taskfile: https://github.com/cvxgrp/.github.git//tasks/setup.yml?ref=main