Repository: nums-project/nums (language: python)

Issue:
Migrate pytest from travis to github.



Discussion / hints:

Fix patch:
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 2e19be9b..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-dist: bionic
-language: python
-python:
-  - "3.7"
-install:
-  - pip install .[testing]
-script:
-  - coverage run -m pytest
-  - coverage report
-  - coverage xml
-after_success:
-  - codecov


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 00000000..08cc73fe
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,39 @@
+name: test
+
+on:
+  pull_request:
+    types: [opened, synchronize, reopened]
+  push:
+    branches:
+      - main
+
+jobs:
+  pytest:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        python-version: [3.7, 3.8]
+    env:
+      OS: 'ubuntu'
+      PYTHON: ${{ matrix.python-version }}
+    steps:
+      - uses: actions/checkout@v2
+      - name: Set up Python ${{ matrix.python-version }}
+        uses: actions/setup-python@v2
+        with:
+          python-version: ${{ matrix.python-version }}
+      - name: Install NumS
+        run: |
+          python3 -m pip install --upgrade pip
+          pip3 install .[testing]
+      - name: Run tests
+        run: |
+          coverage run -m pytest
+      - name: Generate coverage report
+        run: |
+          coverage report
+          coverage xml
+      - name: Upload coverage to Codecov
+        uses: codecov/codecov-action@v2
+        with:
+          env_vars: OS,PYTHON