mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 13:32:15 +00:00
Try a different way of doing coverage
This commit is contained in:
65
.github/workflows/django.yml
vendored
65
.github/workflows/django.yml
vendored
@@ -2,9 +2,9 @@ name: Django CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -19,38 +19,37 @@ jobs:
|
||||
python-version: [3.8]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Setup Chromedriver
|
||||
run: |
|
||||
wget https://chromedriver.storage.googleapis.com/2.36/chromedriver_linux64.zip
|
||||
unzip chromedriver_linux64.zip
|
||||
export PATH=$PATH:$(pwd)
|
||||
chmod +x chromedriver
|
||||
export PATH=$PATH:/usr/lib/chromium-browser/
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pycodestyle coverage
|
||||
pip install -r requirements.txt
|
||||
python manage.py collectstatic --noinput
|
||||
- name: Basic Checks
|
||||
run: |
|
||||
pycodestyle . --exclude=migrations,importer*
|
||||
python manage.py check
|
||||
python manage.py makemigrations --check --dry-run
|
||||
- name: Run Tests
|
||||
run: |
|
||||
coverage run manage.py test --verbosity=2
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Setup Chromedriver
|
||||
run: |
|
||||
wget https://chromedriver.storage.googleapis.com/2.36/chromedriver_linux64.zip
|
||||
unzip chromedriver_linux64.zip
|
||||
export PATH=$PATH:$(pwd)
|
||||
chmod +x chromedriver
|
||||
export PATH=$PATH:/usr/lib/chromium-browser/
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pycodestyle coverage
|
||||
pip install -r requirements.txt
|
||||
python manage.py collectstatic --noinput
|
||||
- name: Basic Checks
|
||||
run: |
|
||||
pycodestyle . --exclude=migrations,importer*
|
||||
python manage.py check
|
||||
python manage.py makemigrations --check --dry-run
|
||||
|
||||
upload-coverage:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- name: Coveralls GitHub Action
|
||||
uses: coverallsapp/github-action@v1.1.2
|
||||
with:
|
||||
github-token: ${{ secrets.github_token }}
|
||||
- name: Run Tests
|
||||
run: coverage run python manage.py test --verbosity=2
|
||||
- name: Upload coverage data to coveralls.io
|
||||
run: coveralls
|
||||
|
||||
Reference in New Issue
Block a user