From 5b82543121fcadfe3b02dfbea6e91de759ce75b8 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 8 Dec 2020 14:10:57 -0500 Subject: [PATCH] Port cibuild.sh tasks to ci.yml --- .github/workflows/ci.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 054bb56c5..297b87a1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7] + python-version: [3.6] services: redis: image: redis @@ -23,17 +23,30 @@ jobs: --health-retries 5 ports: - 5432:5432 + steps: - name: Check out repo uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt pip install pycodestyle coverage - - name: Run build script - run: ./scripts/cibuild.sh + + - name: Link test configuration file + run: ln -s configuration.testing.py netbox/netbox/configuration.py + + - name: Check PEP8 compliance + run: pycodestyle --ignore=W504,E501 netbox/ + + - name: Run tests + run: coverage run --source="netbox/" netbox/manage.py test netbox/ + + - name: Show coverage report + run: coverage report --skip-covered --omit *migrations*