diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e984fc5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/README.md b/README.md index c5d3940..8fa74ca 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/tox.ini b/tox.ini index 76ed9c6..ce5c2fb 100644 --- a/tox.ini +++ b/tox.ini @@ -20,6 +20,6 @@ commands = ruff format --check . [testenv:lint-mypy] -skip_install = true +package = editable deps = mypy commands = mypy