Merge pull request #243 from gm3dmo/remove-title #391
This file contains 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: cmp-django-base-build | |
env: | |
SECRET_KEY: ${{ secrets.DJANGO_SECRET_KEY }} | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
CSRF_TO: ${{ secrets.CSRF_TO }} | |
Env: ${{ secrets.Env }} | |
permissions: | |
pull-requests: write | |
on: | |
workflow_call: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
cmp_core_base_build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: [ 3.11 ] | |
os: [ ubuntu-latest ] | |
steps: | |
- name: Checkout CMP code | |
uses: actions/checkout@v4 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install requirements | |
run: | | |
pip install -r requirements.txt | |
- name: Make Migrations | |
run: | | |
python manage.py makemigrations | |
- name: Migrations | |
run: | | |
python manage.py migrate | |
- name: Collectstatic | |
run: | | |
python manage.py collectstatic | |
- name: Run tests | |
run: | | |
python manage.py test | |
- name: Run test with coverage report | |
run: | | |
pytest --cov-report lcov:cov.info | |
- name: Coveralls Coverage Report | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
if: needs.pr-check.outputs.number != 'null' | |
- name: Artifact Upload coverage report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-report | |
path: | | |
cov.info |