-
Notifications
You must be signed in to change notification settings - Fork 7
36 lines (35 loc) · 1.01 KB
/
coverage_badge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
on:
push:
branches:
- main
paths:
- 'web_dev_challenges/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version-file: '.python-version'
cache: 'pip'
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Set git config
uses: fregante/setup-git-user@v2
- name: Creating tests badge
continue-on-error: true
run: |
pytest --local-badge-output-dir . --local-badge-generate=status
- name: Commit tests badge on coverage-badge branch
run: |
git add .
git commit -m "Create/Update tests badge main branch"
git checkout coverage-badge
git checkout main -- tests.svg
git commit -m "Create/Update tests badge coverage-badge branch"
git push origin coverage-badge