Skip to content

Commit

Permalink
Merge pull request #74 from cvxgrp/workflows
Browse files Browse the repository at this point in the history
Workflows
  • Loading branch information
tschm authored Feb 4, 2025
2 parents 6aef544 + c536484 commit 2dae19e
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 30 deletions.
1 change: 0 additions & 1 deletion .env

This file was deleted.

11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "ci"
name: "CI"

on:
- push
Expand All @@ -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/[email protected]

- 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
28 changes: 10 additions & 18 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]

- uses: cvxgrp/.github/actions/uv/[email protected]

- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
with:
files: artifacts/tests/coverage/coverage.info
format: lcov
- uses: cvxgrp/.github/actions/[email protected]

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/[email protected]

- uses: cvxgrp/.github/actions/uv/[email protected]
- uses: cvxgrp/.github/actions/[email protected]
with:
source-folder: 'cvx'

pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout [${{ github.repository }}]
uses: actions/checkout@v4

- uses: pre-commit/[email protected]
with:
extra_args: '--verbose --all-files'
- uses: cvxgrp/.github/actions/[email protected]
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)
5 changes: 0 additions & 5 deletions taskfile.yml

This file was deleted.

0 comments on commit 2dae19e

Please sign in to comment.