Skip to content

Released v1.2.7 closes #25 #40

Released v1.2.7 closes #25

Released v1.2.7 closes #25 #40

Workflow file for this run

name: build
on: [ pull_request, workflow_dispatch, push ]
env:
MODE: GIT_ACTIONS_DEV
DJANGO_SETTINGS_MODULE: test_app.test_settings
jobs:
basic_checks:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install requirements
run: |
python setup.py install
pip install -r requirements.txt
pip install -r requirements_test.txt
- name: Run Migrations
run: |
cd example
python manage.py migrate
- name: Run Tests
run: |
cd example
coverage run manage.py test
coverage report
- name: Coverage Badge
uses: tj-actions/coverage-badge-py@v2
with:
working-directory: example
output: ../coverage.svg
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v14
id: verify-changed-files
with:
files: coverage.svg
- name: Commit files
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
#mv example/coverage.svg coverage.svg
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add coverage.svg
git commit -m "Updated coverage.svg"
- name: Push changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.github_token }}
branch: ${{ github.ref }}