Skip to content

Commit

Permalink
Merge pull request #163 from cvxgrp/workflows
Browse files Browse the repository at this point in the history
Workflows
  • Loading branch information
tschm authored Feb 3, 2025
2 parents 9c96a88 + e6f2126 commit e9897f7
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 35 deletions.
1 change: 0 additions & 1 deletion .env

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ 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 }}
29 changes: 5 additions & 24 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,15 @@ on:
push:

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

- 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

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

pre-commit:
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: pre-commit/[email protected]
with:
extra_args: '--verbose --all-files'
- uses: cvxgrp/.github/actions/[email protected]
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repos:
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.31.1
hooks:
- id: check-dependabot
- id: check-renovate
args: ["--verbose"]

- id: check-github-workflows
Expand Down
34 changes: 34 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.DEFAULT_GOAL := help

.PHONY: venv install fmt clean help test jupyter

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 src/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)

marimo: install ## Install a run a Jupyter Lab server
uv pip install marimo
#uv run jupyter lab
5 changes: 0 additions & 5 deletions taskfile.yml

This file was deleted.

0 comments on commit e9897f7

Please sign in to comment.