Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
permissions:
id-token: write # to get the OIDC token
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Cache uv dependencies
uses: actions/cache@v4
with:
path: .uv-cache
key: ${{ runner.os }}-uv-${{ hashFiles('**/uv.lock') }}
- name: Install dependencies
run: uv sync --all-extras --cache-dir .uv-cache
- name: Run tests
run: uv run pytest --cov src --cov-branch --cov-report term --cov-report xml:coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
use_oidc: true

ruff_check:
name: ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ruff
uses: astral-sh/ruff-action@v1
with:
args: 'check --output-format=github'
- name: Run ruff format
uses: astral-sh/ruff-action@v1
with:
args: 'format --check'
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Tomlscript

[![codecov](https://codecov.io/gh/phihung/tomlscript/branch/main/graph/badge.svg)](https://codecov.io/gh/phihung/tomlscript)

A lightweight, dependency-free tool to manage your scripts directly from pyproject.toml

<div style="display: flex; justify-content: space-between;align-items: center;">
Expand Down