Skip to content

Merge pull request #380 from rloomans/dependabot/pip/drf-spectacular-… #353

Merge pull request #380 from rloomans/dependabot/pip/drf-spectacular-…

Merge pull request #380 from rloomans/dependabot/pip/drf-spectacular-… #353

Workflow file for this run

name: Django Test
on:
workflow_call:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.9", "3.10", "3.11"]
env:
DATABASE_URL: "sqlite:///:memory"
DJANGO_SETTINGS_MODULE: teamtemp.settings.dev
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: |
pip install -U pip wheel setuptools
pip install -U -r requirements/dev.txt
- name: Setup
run: |
python manage.py migrate --no-input
python manage.py collectstatic --no-input
- name: Run tests
run: |
coverage run manage.py test
coverage xml
coverage lcov
- name: Upload coverage to coveralls.io
uses: coverallsapp/github-action@v2
with:
github-token: ${{ github.token }}
path-to-lcov: coverage.lcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
#token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
verbose: true
# - name: Upload coverage to CodeClimate
# uses: paambaati/codeclimate-action@v3.0.0
# env:
# CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}