Skip to content

Add a None check to avoid crash #536

Add a None check to avoid crash

Add a None check to avoid crash #536

Workflow file for this run

name: Build and Run Unit Test Workflow
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
run-unit-tests:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Build environment
run: |
chmod +x ghostwriter-cli-linux
./ghostwriter-cli-linux install --dev
- name: Generate Coverage report
run: |
docker compose -f local.yml run django coverage run manage.py test --exclude-tag=GitHub
docker compose -f local.yml run django coverage xml -o "coverage/reports/coverage.xml"
- name: Upload Coverage report artifact
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage/reports/coverage.xml
upload-coverage-report:
needs: run-unit-tests
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: codecov-ghostwriter
fail_ci_if_error: true
verbose: true