From f3e0d54e40a7fbcada034a90089635cab0ac2a9d Mon Sep 17 00:00:00 2001 From: ErikKalkoken Date: Sat, 11 Jul 2026 16:05:31 +0200 Subject: [PATCH 1/2] feat: migrate CI/CD pipeline --- .github/workflows/ci-cd.yaml | 105 +++++++++++++++++++++++++++++++++++ .gitlab-ci.yml | 56 ------------------- 2 files changed, 105 insertions(+), 56 deletions(-) create mode 100644 .github/workflows/ci-cd.yaml delete mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml new file mode 100644 index 0000000..3eaf805 --- /dev/null +++ b/.github/workflows/ci-cd.yaml @@ -0,0 +1,105 @@ +name: CI/CD Pipeline + +on: + push: + branches: + - "**" + tags: + - "*" + pull_request: + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.12" + + - name: Run pre-commit + uses: pre-commit/action@v3.0.1 + + pylint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.12" + + - name: Install redis + uses: shogo82148/actions-setup-redis@v1 + with: + redis-version: latest + + - name: Verify that redis is up + run: redis-cli ping + + - name: Run Pylint + run: | + pip install tox + tox -e pylint + + test: + runs-on: ubuntu-latest + needs: [pre-commit, pylint] + strategy: + matrix: + django-version: ["42", "52"] + python-version: ["10", "11", "12"] + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.${{ matrix.python-version }}" + + - name: Install redis + uses: shogo82148/actions-setup-redis@v1 + with: + redis-version: latest + + - name: Verify that redis is up + run: redis-cli ping + + - name: Run Tests + run: | + pip install tox + tox -e py3${{ matrix.python-version }}-django${{ matrix.django-version }} + + - name: Upload Coverage to Codecov + uses: codecov/codecov-action@v6 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: AllianceAuth-Apps/aa-killtracker + + deploy-pypi: + needs: [test] + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.12" + + - name: Install Flit + run: pip install flit + + - name: Build and Publish + run: flit publish + env: + FLIT_USERNAME: ${{ secrets.FLIT_USERNAME }} + FLIT_PASSWORD: ${{ secrets.FLIT_PASSWORD }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 89c4d5b..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,56 +0,0 @@ -stages: - - checks - - test - - deploy - -pre-commit: - stage: checks - image: python:3.12-bookworm - variables: - PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit - cache: - paths: - - ${PRE_COMMIT_HOME} - script: - - pip install pre-commit - - pre-commit run --all-files - -.tox_setup: - before_script: - - apt-get update - - apt-get install redis-server -y - - redis-server --daemonize yes - - python -V - - pip install tox - -pylint: - stage: checks - extends: .tox_setup - image: python:3.10-bookworm - script: - - tox -e pylint - -test: - extends: .tox_setup - image: python:3.$PYTHON_VERSION-bookworm - parallel: - matrix: - - PYTHON_VERSION: [10, 11, 12] - DJANGO_VERSION: [42, 52] - script: - - tox -e py3$PYTHON_VERSION-django$DJANGO_VERSION - - bash <(curl -s https://codecov.io/bash) - -deploy-pypi: - stage: deploy - image: python:3.12-bookworm - - before_script: - - pip install build twine - - script: - - python -m build - - twine upload dist/* - - only: - - tags From a0e04007dac89802435b484f14637c3beddda469 Mon Sep 17 00:00:00 2001 From: ErikKalkoken Date: Sat, 11 Jul 2026 16:17:30 +0200 Subject: [PATCH 2/2] feat: update links for github --- README.md | 6 +++--- killtracker/__init__.py | 4 ++-- pyproject.toml | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index bfd3f06..fd471b1 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ An app for running killmail trackers with Alliance Auth and Discord. [![release](https://img.shields.io/pypi/v/aa-killtracker?label=release)](https://pypi.org/project/aa-killtracker/) [![python](https://img.shields.io/pypi/pyversions/aa-killtracker)](https://pypi.org/project/aa-killtracker/) [![django](https://img.shields.io/pypi/djversions/aa-killtracker?label=django)](https://pypi.org/project/aa-killtracker/) -[![pipeline](https://gitlab.com/ErikKalkoken/aa-killtracker/badges/master/pipeline.svg)](https://gitlab.com/ErikKalkoken/aa-killtracker/-/pipelines) -[![codecov](https://codecov.io/gl/ErikKalkoken/aa-killtracker/branch/master/graph/badge.svg?token=ZTGEX30YIN)](https://codecov.io/gl/ErikKalkoken/aa-killtracker) -[![license](https://img.shields.io/badge/license-MIT-green)](https://gitlab.com/ErikKalkoken/aa-killtracker/-/blob/master/LICENSE) +[![CI/CD Pipeline](https://github.com/AllianceAuth-Apps/aa-killtracker/actions/workflows/ci-cd.yaml/badge.svg)](https://github.com/AllianceAuth-Apps/aa-killtracker/actions/workflows/ci-cd.yaml) +[![codecov](https://codecov.io/github/AllianceAuth-Apps/aa-killtracker/graph/badge.svg?token=gERQsrIq4L)](https://codecov.io/github/AllianceAuth-Apps/aa-killtracker) +[![license](https://img.shields.io/badge/license-MIT-green)](https://github.com/AllianceAuth-Apps/aa-killtracker#MIT-1-ov-file) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![chat](https://img.shields.io/discord/790364535294132234)](https://discord.gg/mevDXbxp4R) diff --git a/killtracker/__init__.py b/killtracker/__init__.py index d138b7f..a2bce11 100644 --- a/killtracker/__init__.py +++ b/killtracker/__init__.py @@ -3,9 +3,9 @@ # pylint: disable = invalid-name default_app_config = "killtracker.apps.KillmailsConfig" -__version__ = "2.0.0" +__version__ = "2.0.1" __title__ = "Killtracker" APP_NAME = "aa-killtracker" -HOMEPAGE_URL = "https://gitlab.com/ErikKalkoken/aa-killtracker" +HOMEPAGE_URL = "https://github.com/AllianceAuth-Apps/aa-killtracker" USER_AGENT_TEXT = f"{APP_NAME} v{__version__}" diff --git a/pyproject.toml b/pyproject.toml index 1cc5a99..286c350 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,6 @@ classifiers = [ "Framework :: Django :: 4.2", "Framework :: Django :: 5.2", "Intended Audience :: End Users/Desktop", - "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.10", @@ -38,7 +37,7 @@ dependencies = [ test = ["coverage", "factory_boy", "pook", "django-webtest"] [project.urls] -Home = "https://gitlab.com/ErikKalkoken/aa-killtracker" +Home = "https://github.com/AllianceAuth-Apps/aa-killtracker" [tool.flit.module] name = "killtracker"