Skip to content

Commit

Permalink
πŸ‘·πŸΌ Add a basic CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamim committed May 11, 2024
1 parent e33d5dc commit 4605909
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
- push
- pull_request

env:
FORCE_COLOR: 1

jobs:
test:
name: πŸ§ͺ Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python:
- '3.12'
- '3.11'
- '3.10'
steps:
- uses: actions/checkout@v4
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pdm install -G test --frozen-lockfile
- name: Run pytest
run: pdm run pytest -v

lint:
name: 🧐 Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: '3.12'
- name: Install dependencies
run: pdm install -G lint --frozen-lockfile
- name: Lint with ruff
run: |
pdm run ruff check .
pdm run ruff format --check .
- name: Type check with mypy
run: pdm run mypy
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# πŸ—ƒοΈ Gentoo Cache Manager

[![CI][ci-badge]][ci]

**Gentoo Cache Manager** aims to help you tweaking build cache settings for individual packages in [Gentoo Linux][gentoo] and some [Gentoo-based][gentoo-based] operating systems.

## πŸ§‘πŸ½β€πŸ”¬ Usage
Expand All @@ -14,6 +16,8 @@ To disable it, run:
gcm disable glibc
```

[ci-badge]: https://img.shields.io/github/actions/workflow/status/Jamim/gentoo-cache-manager/ci.yml.svg
[ci]: https://github.com/Jamim/gentoo-cache-manager/actions/workflows/ci.yml
[gentoo]: https://www.gentoo.org
[gentoo-based]: https://wiki.gentoo.org/wiki/Distributions_based_on_Gentoo
[ccache]: https://wiki.gentoo.org/wiki/Ccache
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ commands =
ruff format --check .

[testenv:lint-mypy]
skip_install = true
package = editable
deps = mypy
commands = mypy

0 comments on commit 4605909

Please sign in to comment.