diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..07e7ddc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: + pull_request: + branches: [main] + push: + branches: [main] + +permissions: + contents: read + +jobs: + lint-and-test: + name: lint-and-test + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Read pinned Python version + id: pyver + run: echo "version=$(cat .python-version)" >> "$GITHUB_OUTPUT" + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ steps.pyver.outputs.version }} + cache: pip + + - name: Install dependencies + run: pip install -r requirements.txt -r requirements-dev.txt + + - name: Lint + run: ruff check . + + - name: Test + run: pytest tests/ -v diff --git a/README.md b/README.md index 4563f21..832cea5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # JS — Job Search +[![CI](https://github.com/ukrainets/JobScanner/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ukrainets/JobScanner/actions/workflows/ci.yml) + A tool that automates scanning companies career pages for matching job titles. **Purpose** diff --git a/pyproject.toml b/pyproject.toml index 0b18678..1d6eae8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.ruff] -target-version = "py313" +target-version = "py312" line-length = 200 [tool.ruff.lint]