Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
name: OpenWISP Network Topology CI Build

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
name: Python==${{ matrix.python-version }} | ${{ matrix.django-version }}
runs-on: ubuntu-20.04

strategy:
fail-fast: false
matrix:
python-version:
- 3.6
- 3.7
django-version:
- django~=2.2.0
- django~=3.0.0
- django~=3.1.0

steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install python system packages
run: pip install -U "pip==20.2.4" wheel setuptools

- name: Install openwisp-network-topology
run: pip install -e .

- name: Install test dependencies
run: |
pip install -U -r requirements-test.txt
pip install ${{ matrix.django-version }}

- name: QA checks
run: ./run-qa-checks

- name: Tests
run: |
coverage run --source=openwisp_network_topology runtests.py
SAMPLE_APP=1 ./runtests.py --parallel --keepdb

- name: Upload Coverage
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: |
python-${{ matrix.python-version }}-${{ matrix.django-version }}
COVERALLS_PARALLEL: true

coveralls:
name: Finish Coveralls
needs: build
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
openwisp-network-topology
=========================

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

.. image:: https://coveralls.io/repos/github/openwisp/openwisp-network-topology/badge.svg
Expand Down
1 change: 0 additions & 1 deletion openwisp_network_topology/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import swapper
from django.core.exceptions import ValidationError
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from netdiff.exceptions import NetdiffException
from rest_framework import generics
Expand Down
5 changes: 4 additions & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
coveralls
responses
freezegun
openwisp-utils[qa]~=0.7.0
# TODO: change this when next point version of openwisp-utils is released
openwisp-utils[qa] @ https://github.com/openwisp/openwisp-utils/tarball/master
openwisp-controller~=0.8
# Needed to test integrations
openwisp-monitoring @ https://github.com/openwisp/openwisp-monitoring/tarball/master