-
-
Save omonimus1/e42fd5154f7ebd620e1188168a7c9b2f to your computer and use it in GitHub Desktop.
Pepeline for django Project
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: Testing and Coverage | |
on: | |
push: | |
branches: [ develop, master, staging ] | |
pull_request: | |
branches: [ develop, master, staging ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 12 | |
environment: | |
name: development | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: [3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -r requirements/testing.txt | |
- uses: codecov/codecov-action@v2 | |
- name: Run Tests and Upload coverage testing | |
env: | |
SECRET_KEY: ${{ secrets.SECRET_KEY }} | |
DEBUG: ${{ secrets.DEBUG }} | |
DATABASE_HOST: ${{ secrets.DATABASE_HOST }} | |
DATABASE_NAME: ${{ secrets.DATABASE_NAME }} | |
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }} | |
DATABASE_USER: ${{ secrets.DATABASE_USER }} | |
DATABASE_PORT: ${{ secrets.DATABASE_PORT }} | |
HOST: ${{ secrets.HOST }} | |
run: | | |
python3 manage.py makemigrations | |
python3 manage.py migrate | |
python3 manage.py test | |
pytest --cov --cov-report xml . | |
codecov -t ${{ secrets.CODECOV_TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment