Skip to content

Commit

Permalink
Migrate from Make to Just (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh authored Dec 24, 2022
1 parent 8151a2c commit 48c5642
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 42 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
os: [ ubuntu-18.04, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
Expand All @@ -25,12 +28,8 @@ jobs:
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: poetry install
- name: Run Ruff
run: poetry run ruff ./ruff_lsp ./tests
- name: Run Black
run: poetry run black --check ./ruff_lsp ./tests
- name: Run Mypy
run: poetry run mypy ./ruff_lsp ./tests
- name: Run unittest
run: poetry run python -m unittest
run: just install
- name: Run checks
run: just check
- name: Run tests
run: just test
13 changes: 0 additions & 13 deletions Makefile

This file was deleted.

10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,16 @@ the following settings are supported:

## Development

Install [`just`](https://github.com/casey/just).

`ruff-lsp` uses Poetry for environment management and packaging. To get started, clone the
repository, install Poetry, and run `poetry install`.
repository, install Poetry, and run `poetry install` (or `just install`).

To automatically format the codebase, run: `just fmt`.

To automatically format the codebase, run: `make format`.
To run lint and type checks, run: `just check`.

To run lint and type checks, run: `make check`.
To run tests, run: `just test`.

## License

Expand Down
19 changes: 19 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
default: fmt check

lock:
poetry lock

install:
poetry install

fmt:
poetry run ruff --fix ./ruff_lsp ./tests
poetry run black ./ruff_lsp ./tests

check:
poetry run ruff ./ruff_lsp ./tests
poetry run black --check ./ruff_lsp ./tests
poetry run mypy ./ruff_lsp ./tests

test:
poetry run python -m unittest
34 changes: 17 additions & 17 deletions poetry.lock

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

0 comments on commit 48c5642

Please sign in to comment.