From 4d09f9d82c057a44c7819bc8b75517fe936314b1 Mon Sep 17 00:00:00 2001
From: Thor77 <thor77@thor77.org>
Date: Sat, 14 Jan 2023 12:33:29 +0100
Subject: [PATCH] Switch to GitHub actions

---
 .github/workflows/test.yml | 41 ++++++++++++++++++++++++++++++++++++++
 .travis.yml                | 25 -----------------------
 2 files changed, 41 insertions(+), 25 deletions(-)
 create mode 100644 .github/workflows/test.yml
 delete mode 100644 .travis.yml

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..73545f3
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,41 @@
+name: test
+
+on:
+  push: {}
+  pull_request: {}
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+      - uses: actions/setup-python@v4
+        with:
+          python-version: 3.10
+      - name: Setup poetry
+        uses: abatilo/actions-poetry@v2
+        with:
+          poetry-version: 1.3
+      - name: Install dependencies
+        run: poetry install
+      - name: Lint
+        run: poetry run pylama tsstats/
+  test:
+    strategy:
+      fail-fast: false
+      matrix:
+        python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+      - uses: actions/setup-python@v4
+        with:
+          python-version: ${{ matrix.python-version }}
+      - name: Setup poetry
+        uses: abatilo/actions-poetry@v2
+        with:
+          poetry-version: 1.3
+      - name: Install dependencies
+        run: poetry install
+      - name: Run tests
+        run: poetry run pytest tsstats/
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 3fd513d..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-language: python
-python:
-  - 3.7
-  - 3.8
-
-matrix:
-  include:
-    - python: 3.8
-      install:
-        - pip install -r requirements.txt
-        - pip install -r requirements-dev.txt
-        - pip install pylama
-      script:
-        - pylama tsstats
-
-install:
-  - pip install -r requirements.txt
-  - pip install -r requirements-dev.txt
-  - pip install pytest-cov
-
-script: py.test --cov=tsstats tsstats/
-
-after_success:
-  - pip install coveralls
-  - coveralls