From d03b61d431ac2abf01be5e3ceea10bad62011ee0 Mon Sep 17 00:00:00 2001
From: Jonathan Weth <git@jonathanweth.de>
Date: Sun, 4 Jul 2021 20:47:59 +0200
Subject: [PATCH] Use GitLab CI and drop GitHub CI

---
 .github/workflows/lint.yml     | 24 ------------------------
 .github/workflows/reformat.yml | 29 -----------------------------
 .gitlab-ci.yml                 | 31 +++++++++++++++++++++++++++++++
 3 files changed, 31 insertions(+), 53 deletions(-)
 delete mode 100644 .github/workflows/lint.yml
 delete mode 100644 .github/workflows/reformat.yml
 create mode 100644 .gitlab-ci.yml

diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
deleted file mode 100644
index 2fc7f84..0000000
--- a/.github/workflows/lint.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-name: Lint
-
-on:
-  push:
-
-jobs:
-  lint:
-    name: Run lint
-    runs-on: ubuntu-latest
-
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v2
-        with:
-          ref: ${{ github.head_ref }}
-      - uses: actions/setup-python@v2
-        with:
-          python-version: 3.9
-      - name: Install poetry
-        uses: abatilo/actions-poetry@v2.0.0
-      - name: Install dependencies
-        run: pip install tox
-      - name: Lint
-        run: tox -e lint,security
diff --git a/.github/workflows/reformat.yml b/.github/workflows/reformat.yml
deleted file mode 100644
index e87c5bf..0000000
--- a/.github/workflows/reformat.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-name: Reformat
-
-on:
-  push:
-
-jobs:
-  black:
-    name: Run black/isort
-    runs-on: ubuntu-latest
-
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v2
-        with:
-          ref: ${{ github.head_ref }}
-      - uses: actions/setup-python@v2
-        with:
-          python-version: 3.9
-      - name: Install poetry
-        uses: abatilo/actions-poetry@v2.0.0
-      - name: Install dependencies
-        run: pip install tox
-      - name: Reformat
-        run: tox -e reformat
-      - uses: stefanzweifel/git-auto-commit-action@v4
-        with:
-          commit_message: "Reformat code using black"
-          commit_options: '--no-verify --signoff'
-          file_pattern: "*.py"
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..6e97338
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,31 @@
+image: "debian:buster"
+
+.before-script: &before-script
+  - apt update && apt install -y python3-setuptools python3-pip python3-dev git
+  - pip3 install poetry tox
+
+before_script:
+  - *before-script
+
+stages:
+  - test
+  - build
+
+lint:
+  stage: test
+  script:
+    - tox -e lint
+
+build-deb:
+  stage: build
+  before_script:
+    - *before-script
+    - apt update && apt install -y build-essential debhelper devscripts equivs dh-virtualenv libffi-dev
+  script:
+    - ./build-deb.sh
+    - mkdir build
+    - mv ../*.deb build/
+
+  artifacts:
+    paths:
+      - build/*
\ No newline at end of file
-- 
GitLab