diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..862b16a --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,33 @@ +name: Lint + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.12] + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install uv + uv venv venv + . venv/bin/activate + uv pip install .[dev] + - name: Run Ruff + run: | + . venv/bin/activate + make lint-check diff --git a/accounts/tests.py b/accounts/tests.py index 3392fcc..14d1adf 100644 --- a/accounts/tests.py +++ b/accounts/tests.py @@ -391,7 +391,4 @@ def test_profile_detail_view_cant_follow_wrong_path(self): response = self.client.post(f"/profiles/{self.user.username}/follow/23") self.assertEqual(response.status_code, 404) except Exception as e: - self.assertEqual(e.args[0], 'Cannot resolve "/profiles/testuser/follow/23"') - - def test_the_ci_is_broken(self): - raise Exception("just kiddin") + self.assertEqual(e.args[0], 'Cannot resolve "/profiles/testuser/follow/23"')