Skip to content

Commit

Permalink
ci: add github ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
u8slvn committed Aug 14, 2024
1 parent 3c56bf9 commit 5e26e2b
Show file tree
Hide file tree
Showing 4 changed files with 262 additions and 3 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
tests:
name: ${{ matrix.os }} - ${{ matrix.python-version }}
runs-on: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
os: [ Ubuntu, macOS, Windows ]
include:
- os: Ubuntu
image: ubuntu-22.04
- os: Windows
image: windows-2022
- os: macOS
image: macos-12
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3

- name: Setup headless display
uses: pyvista/setup-headless-display-action@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
run: curl -sSL https://install.python-poetry.org | python - -y

- name: Update poetry path
if: ${{ matrix.os != 'Windows' }}
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Update poetry path for windows
if: ${{ matrix.os == 'Windows' }}
run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH

- name: Configure poetry
run: poetry config virtualenvs.in-project true

- name: Install dependencies
run: poetry install

- name: Check quality
run: |
poetry run pre-commit run --all-files
- name: Check tests
run: |
poetry run mypy
poetry run pytest tests/ --cov=src
- name: Publish coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name != 'pull_request'
run: |
pip install coveralls
coveralls --service=github
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# doggo
# 🐕 doggo
<p align="center">
<a href="https://github.com/u8slvn/doggo/releases"><img alt="GitHub tag (with filter)" src="https://img.shields.io/github/v/release/u8slvn/doggo"></a>
<a href="https://github.com/u8slvn/doggo/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/u8slvn/doggo/ci.yml?label=CI" alt="CI"></a>
<a href="https://coveralls.io/github/u8slvn/doggo?branch=main"><img src="https://coveralls.io/repos/github/u8slvn/doggo/badge.svg?branch=main" alt="Coverage Status"></a>
<a href="https://app.codacy.com/gh/u8slvn/doggo/dashboard"><img src="https://img.shields.io/codacy/grade/359900931def4b2cba3552678519ce2e" alt="Code Quality"></a>
<a href="https://github.com/u8slvn/doggo"><img src="https://img.shields.io/github/license/u8slvn/doggo" alt="Project license"></a>
</p>


## Licenses

Expand Down
183 changes: 181 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pytest = "^8.2.2"
pytest-mock = "^3.14.0"
pytest-cov = "^5.0.0"
mypy = "^1.10.0"
pre-commit = "^3.8.0"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit 5e26e2b

Please sign in to comment.