Merge pull request #838 from GhostManager/hotfix/fixed-pfp-distortion #1149
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Run Unit Test Workflow | |
| on: | |
| workflow_dispatch: | |
| 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: Get django logs | |
| if: failure() | |
| run: | | |
| docker compose -f local.yml logs django > django-logs.txt | |
| - name: Upload django logs artifact | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: django-logs | |
| path: django-logs.txt | |
| - 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 |