diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..8302a9f31 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,11 @@ + + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..fb3e520ad --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +--- +name: CI +on: + push: + pull_request: + types: + - opened + - synchronize + - reopened + +jobs: + ci: + strategy: + matrix: + python-version: ["3.11"] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Create venv + run: | + python3 -m venv .venv + + - name: Load cached venv + id: cached-poetry-dependencies + uses: actions/cache@v3 + with: + path: .venv + key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements_dev.txt') }} + + - name: Install dependencies + run: .venv/bin/pip install -r ./requirements_dev.txt + + - name: Test + run: | + . .venv/bin/activate + make test diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..51265ad1a --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +.PHONY: all +all: + +.PHONY: style +style: + ruff format --respect-gitignore + +.PHONY: test_style +test_style: + ruff format --respect-gitignore --check + +.PHONY: test +test: test_style + + +.DELETE_ON_ERROR: +SHELL=/bin/bash diff --git a/requirements_dev.txt b/requirements_dev.txt new file mode 100644 index 000000000..e43c0da30 --- /dev/null +++ b/requirements_dev.txt @@ -0,0 +1 @@ +ruff==0.3.4