Try a different way of doing coverage

This commit is contained in:
2021-01-25 00:05:22 +00:00
parent 01a828a14a
commit 169ecea866
2 changed files with 33 additions and 33 deletions

View File

@@ -2,9 +2,9 @@ name: Django CI
on: on:
push: push:
branches: [ master ] branches: [master]
pull_request: pull_request:
branches: [ master ] branches: [master]
jobs: jobs:
build: build:
@@ -19,38 +19,37 @@ jobs:
python-version: [3.8] python-version: [3.8]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Setup Chromedriver - name: Setup Chromedriver
run: | run: |
wget https://chromedriver.storage.googleapis.com/2.36/chromedriver_linux64.zip wget https://chromedriver.storage.googleapis.com/2.36/chromedriver_linux64.zip
unzip chromedriver_linux64.zip unzip chromedriver_linux64.zip
export PATH=$PATH:$(pwd) export PATH=$PATH:$(pwd)
chmod +x chromedriver chmod +x chromedriver
export PATH=$PATH:/usr/lib/chromium-browser/ export PATH=$PATH:/usr/lib/chromium-browser/
- name: Install Dependencies - name: Install Dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install pycodestyle coverage pip install pycodestyle coverage
pip install -r requirements.txt pip install -r requirements.txt
python manage.py collectstatic --noinput python manage.py collectstatic --noinput
- name: Basic Checks - name: Basic Checks
run: | run: |
pycodestyle . --exclude=migrations,importer* pycodestyle . --exclude=migrations,importer*
python manage.py check python manage.py check
python manage.py makemigrations --check --dry-run python manage.py makemigrations --check --dry-run
- name: Run Tests
run: |
coverage run manage.py test --verbosity=2
upload-coverage: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps: steps:
- name: Coveralls GitHub Action - name: Run Tests
uses: coverallsapp/github-action@v1.1.2 run: coverage run python manage.py test --verbosity=2
with: - name: Upload coverage data to coveralls.io
github-token: ${{ secrets.github_token }} run: coveralls

View File

@@ -9,6 +9,7 @@ chardet==3.0.4
configparser==5.0.1 configparser==5.0.1
contextlib2==0.6.0.post1 contextlib2==0.6.0.post1
coverage==5.3 coverage==5.3
coveralls==3.0.0
cssselect==1.1.0 cssselect==1.1.0
cssutils==1.0.2 cssutils==1.0.2
diff-match-patch==20200713 diff-match-patch==20200713