Skip to content

Commit da7a31e

Browse files
committed
[ci] Migrated CI to github #105
closes #105
1 parent 2ab2fd1 commit da7a31e

5 files changed

Lines changed: 82 additions & 44 deletions

File tree

.github/workflows/ci.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
name: OpenWISP Network Topology CI Build
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
build:
14+
name: Python==${{ matrix.python-version }} | ${{ matrix.django-version }}
15+
runs-on: ubuntu-20.04
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version:
21+
- 3.6
22+
- 3.7
23+
django-version:
24+
- django~=2.2.0
25+
- django~=3.0.0
26+
- django~=3.1.0
27+
28+
steps:
29+
- uses: actions/checkout@v2
30+
with:
31+
ref: ${{ github.event.pull_request.head.sha }}
32+
33+
- name: Set up Python ${{ matrix.python-version }}
34+
uses: actions/setup-python@v2
35+
with:
36+
python-version: ${{ matrix.python-version }}
37+
38+
- name: Install python system packages
39+
run: pip install -U "pip==20.2.4" wheel setuptools
40+
41+
- name: Install openwisp-network-topology
42+
run: pip install -e .
43+
44+
- name: Install test dependencies
45+
run: |
46+
pip install -U -r requirements-test.txt
47+
pip install ${{ matrix.django-version }}
48+
49+
- name: QA checks
50+
run: ./run-qa-checks
51+
52+
- name: Tests
53+
run: |
54+
coverage run --source=openwisp_network_topology runtests.py
55+
SAMPLE_APP=1 ./runtests.py --parallel --keepdb
56+
57+
- name: Upload Coverage
58+
run: coveralls --service=github
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
COVERALLS_FLAG_NAME: |
62+
python-${{ matrix.python-version }}-${{ matrix.django-version }}
63+
COVERALLS_PARALLEL: true
64+
65+
coveralls:
66+
name: Finish Coveralls
67+
needs: build
68+
runs-on: ubuntu-latest
69+
container: python:3-slim
70+
steps:
71+
- name: Finished
72+
run: |
73+
pip3 install --upgrade coveralls
74+
coveralls --finish
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.travis.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
openwisp-network-topology
33
=========================
44

5-
.. image:: https://travis-ci.org/openwisp/openwisp-network-topology.svg?branch=master
6-
:target: https://travis-ci.org/openwisp/openwisp-network-topology
5+
.. image:: https://github.com/openwisp/openwisp-network-topology/workflows/OpenWISP%20Network%20Topology%20CI%20Build/badge.svg?branch=master
6+
:target: https://github.com/openwisp/openwisp-network-topology/actions?query=OpenWISP+Network+Topology+CI+Build
77
:alt: CI build status
88

99
.. image:: https://coveralls.io/repos/github/openwisp/openwisp-network-topology/badge.svg

openwisp_network_topology/api/views.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import swapper
55
from django.core.exceptions import ValidationError
6-
from django.urls import reverse
76
from django.utils.translation import ugettext_lazy as _
87
from netdiff.exceptions import NetdiffException
98
from rest_framework import generics

requirements-test.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
coveralls
22
responses
33
freezegun
4-
openwisp-utils[qa]~=0.7.0
4+
# TODO: change this when next point version of openwisp-utils is released
5+
openwisp-utils[qa] @ https://github.com/openwisp/openwisp-utils/tarball/master
56
openwisp-controller~=0.8
7+
# Needed to test integrations
8+
openwisp-monitoring @ https://github.com/openwisp/openwisp-monitoring/tarball/master

0 commit comments

Comments
 (0)