Skip to content

Commit

Permalink
ci: policy check workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau committed Oct 23, 2024
1 parent cc53f65 commit ac9b963
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 27 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/cla-check.yaml

This file was deleted.

7 changes: 7 additions & 0 deletions .github/workflows/policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Check policy
on:
pull_request:

jobs:
policy:
uses: lengau/starflow/.github/workflows/policy.yaml@work/CRAFT-3602/test-workflows
5 changes: 1 addition & 4 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ on:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: lengau/starflow/lint@work/CRAFT-3602/test-workflows
uses: lengau/starflow/.github/workflows/lint.yaml@work/CRAFT-3602/test-workflows
test:
uses: lengau/starflow/.github/workflows/test-python.yaml@work/CRAFT-3602/test-workflows
30 changes: 16 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ setup-docs: install-uv ##- Set up a documentation-only environment

.PHONY: setup-precommit
setup-precommit: install-uv ##- Set up pre-commit hooks in this repository.
ifeq ($(shell command -v pre-commit),)
ifeq ($(shell which pre-commit),)
uv tool install pre-commit
endif
pre-commit install
Expand Down Expand Up @@ -96,7 +96,7 @@ lint-mypy: ##- Check types with mypy

.PHONY: lint-pyright
lint-pyright: ##- Check types with pyright
ifneq ($(shell command -v pyright),)
ifneq ($(shell which pyright),)
pyright --pythonpath .venv/bin/python
else
# Fix for a bug in npm
Expand Down Expand Up @@ -169,29 +169,31 @@ clean: ## Clean up the development environment

.PHONY: install-uv
install-uv:
ifneq ($(shell command -v uv),)
else ifneq ($(shell command -v snap),)
ifneq ($(shell which uv),)
else ifneq ($(shell which snap),)
sudo snap install --classic astral-uv
else ifneq ($(shell command -v brew),)
else ifneq ($(shell which brew),)
brew install uv
else ifeq ($(OS),Windows_NT)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
else
pipx install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
endif

.PHONY: install-codespell
install-codespell:
ifneq ($(shell command -v codespell),)
else ifneq ($(shell command -v snap),)
ifneq ($(shell which codespell),)
else ifneq ($(shell which snap),)
sudo snap install codespell
else ifneq ($(shell command -v brew),)
else ifneq ($(shell which brew),)
make install-uv
uv tool install codespell
endif

.PHONY: install-ruff
install-ruff:
ifneq ($(shell command -v ruff),)
else ifneq ($(shell command -v snap),)
ifneq ($(shell which ruff),)
else ifneq ($(shell which snap),)
sudo snap install ruff
else
make install-uv
Expand All @@ -200,9 +202,9 @@ endif

.PHONY: install-shellcheck
install-shellcheck:
ifneq ($(shell command -v shellcheck),)
else ifneq ($(shell command -v snap),)
ifneq ($(shell which shellcheck),)
else ifneq ($(shell which snap),)
sudo snap install shellcheck
else ifneq ($(shell command -v brew),)
else ifneq ($(shell which brew),)
brew install shellcheck
endif

0 comments on commit ac9b963

Please sign in to comment.