Skip to content

Commit

Permalink
test: add test and codecov for every commit (prev. only when deploy)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiyoon committed Nov 14, 2024
1 parent ad816e4 commit c3172fc
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Tests
on:
push:
branches:
- main
- master
pull_request:

jobs:
build-linux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-24.04
target: manylinux_2_17_x86_64.manylinux2014_x86_64
python-version: ['3.10']
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
pip install uv --user --break-system-packages
uv tool install build
uv tool install wheel
- name: Build app
run: |
bash build_reduce_linux.sh v4.14
- name: Build python wheel
run: |
bash build_python.sh 4.14.0.2 ${{ matrix.platform.target }}
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup python environment
run: |
uv venv
source .venv/bin/activate
uv pip install -r requirements_test.txt
uv pip install build_python/dist/*.whl
- name: Run pytest
uses: deargen/workflows/actions/run-pytest@master
with:
additional-args: --cov-report=xml --cov-report=term
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
[![PyPI - Downloads](https://img.shields.io/pypi/dm/reduce-binary)](https://pypistats.org/packages/reduce-binary)
[![image](https://img.shields.io/pypi/l/reduce-binary.svg)](https://pypi.python.org/pypi/reduce-binary)
[![image](https://img.shields.io/pypi/pyversions/reduce-binary.svg)](https://pypi.python.org/pypi/reduce-binary)

[![Actions status](https://github.com/deargen/py-reduce-binary/workflows/Tests/badge.svg)](https://github.com/deargen/py-reduce-binary/actions)
[![codecov](https://codecov.io/github/deargen/py-reduce-binary/graph/badge.svg?token=S9MD6B44J6)](https://codecov.io/github/deargen/py-reduce-binary)

Install and use [reduce](https://github.com/rlabduke/reduce) with ease in Python.

Expand Down

0 comments on commit c3172fc

Please sign in to comment.