From 41a19e7ae49ebc201b1b9d2eda430f3db644d6a2 Mon Sep 17 00:00:00 2001 From: vstet Date: Thu, 24 Sep 2026 20:13:17 -0500 Subject: [PATCH 1/2] Add CI workflow: lint and test on PRs and push to main Runs ruff check and pytest on every pull request to main and every push to main, using the Python version pinned in .python-version. No Playwright browser install is needed since the test suite mocks network calls (httpx) rather than driving a browser. Refs #28 Co-Authored-By: Claude Sonnet 5 --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/ci.yml 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 From e8d792c5b760a6f3ce281c1bcfc3ff0f4e1cfe45 Mon Sep 17 00:00:00 2001 From: vstet Date: Thu, 24 Sep 2026 20:16:32 -0500 Subject: [PATCH 2/2] Add CI status badge and align ruff target with Python 3.12 The badge shows the lint-and-test result for main. Ruff targeted py313 while .python-version and CI run 3.12. Co-Authored-By: Claude Opus 5.5 --- README.md | 2 ++ pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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]