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
59 changes: 59 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI

on:
push:
pull_request:

jobs:
run-test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
python-version: "3.12.12"
enable-cache: true

- name: Install Dependencies
run: |
uv venv --allow-existing
uv pip install -r requirements.txt -r requirements-dev.txt

- name: Run Tests
run: |
source .venv/bin/activate
pytest --cov-branch --cov --cov-report=xml

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: coverage.xml
fail_ci_if_error: true
use_pypi: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

check-linting:
name: Check Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
python-version: "3.12.12"
enable-cache: true

- name: Install Dependencies
run: |
uv venv --allow-existing
uv pip install -r requirements.txt -r requirements-dev.txt

- name: Run Ruff
run: |
source .venv/bin/activate
ruff check sample_package tests
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Python Project Setup

[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![cosmoquester](https://circleci.com/gh/cosmoquester/python3-template.svg?style=svg)](https://app.circleci.com/pipelines/github/cosmoquester/python3-template)
[![CircleCI](https://circleci.com/gh/cosmoquester/python3-template.svg?style=svg)](https://app.circleci.com/pipelines/github/cosmoquester/python3-template)
[![GithubAction](https://github.com/cosmoquester/python3-template/actions/workflows/validate.yml/badge.svg)](https://github.com/cosmoquester/python3-template/actions/workflows/validate.yml)

- This repository is template for my python project

Expand Down
Loading