Skip to content

Commit cdfbec5

Browse files
Continuous Integration workflow reviewed
1 parent 5caa8c4 commit cdfbec5

File tree

3 files changed

+45
-14
lines changed

3 files changed

+45
-14
lines changed

.coveragerc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[run]
2+
omit =
3+
*/commands/*
4+
*/factories/*
5+
*/migrations/*
6+
*/settings/*
7+
*/tests/*
8+
*__init__.py
9+
*admin.py
10+
*quantities.py
11+
*renderers.py
12+
*storage.py
13+
*tests.py
14+
*wsgi.py
15+
16+
[report]
17+
sort = -cover
18+
19+
[html]
20+
directory = coverage

.github/workflows/continuous_integration.yml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ concurrency:
77
on:
88

99
schedule:
10-
- cron: '30 1,13 * * 1-5' # At minute 30 past hour 1 and 13 on every day-of-week from Monday through Friday
10+
- cron: '30 1 * * 1-5' # At minute 30 past hour 1 on every day-of-week from Monday through Friday
1111

1212
jobs:
1313

@@ -27,15 +27,16 @@ jobs:
2727
run: |
2828
echo "::set-output name=repository::$( echo "${{ github.repository }}" )"
2929
echo "::set-output name=repository_owner::$( echo "${{ github.repository_owner }}" )"
30-
echo "::set-output name=repository_name::$( echo "${{ github.event.repository.name }}" )"
31-
echo "::set-output name=branch::$( echo "${{ github.event.repository.default_branch }}" )"
30+
echo "::set-output name=repository_name::$( echo "${{ github.repository }}" | sed --regexp-extended --expression 's|${{ github.repository_owner }}\/||g' )"
31+
echo "::set-output name=branch_name::$( echo "${{ github.ref_name }}" )"
32+
echo "::set-output name=branch_ref::$( echo "${{ github.ref }}" )"
3233
shell: bash
3334

3435
- name: 'Check out repository'
3536
id: checkout
3637
uses: actions/checkout@v3
3738
with:
38-
ref: '${{ steps.setup.outputs.branch }}'
39+
ref: '${{ steps.setup.outputs.branch_ref }}'
3940

4041
- name: 'Set up python'
4142
id: python
@@ -102,15 +103,16 @@ jobs:
102103
run: |
103104
echo "::set-output name=repository::$( echo "${{ github.repository }}" )"
104105
echo "::set-output name=repository_owner::$( echo "${{ github.repository_owner }}" )"
105-
echo "::set-output name=repository_name::$( echo "${{ github.event.repository.name }}" )"
106-
echo "::set-output name=branch::$( echo "${{ github.event.repository.default_branch }}" )"
106+
echo "::set-output name=repository_name::$( echo "${{ github.repository }}" | sed --regexp-extended --expression 's|${{ github.repository_owner }}\/||g' )"
107+
echo "::set-output name=branch_name::$( echo "${{ github.ref_name }}" )"
108+
echo "::set-output name=branch_ref::$( echo "${{ github.ref }}" )"
107109
shell: bash
108110

109111
- name: 'Check out repository'
110112
id: checkout
111113
uses: actions/checkout@v3
112114
with:
113-
ref: '${{ steps.setup.outputs.branch }}'
115+
ref: '${{ steps.setup.outputs.branch_ref }}'
114116

115117
- name: 'Set up python'
116118
id: python
@@ -136,15 +138,16 @@ jobs:
136138
run: |
137139
echo "::set-output name=repository::$( echo "${{ github.repository }}" )"
138140
echo "::set-output name=repository_owner::$( echo "${{ github.repository_owner }}" )"
139-
echo "::set-output name=repository_name::$( echo "${{ github.event.repository.name }}" )"
140-
echo "::set-output name=branch::$( echo "${{ github.event.repository.default_branch }}" )"
141+
echo "::set-output name=repository_name::$( echo "${{ github.repository }}" | sed --regexp-extended --expression 's|${{ github.repository_owner }}\/||g' )"
142+
echo "::set-output name=branch_name::$( echo "${{ github.ref_name }}" )"
143+
echo "::set-output name=branch_ref::$( echo "${{ github.ref }}" )"
141144
shell: bash
142145

143146
- name: 'Check out repository'
144147
id: checkout
145148
uses: actions/checkout@v3
146149
with:
147-
ref: '${{ steps.setup.outputs.branch }}'
150+
ref: '${{ steps.setup.outputs.branch_ref }}'
148151

149152
- name: 'Get build version'
150153
id: versioning
@@ -181,16 +184,17 @@ jobs:
181184
run: |
182185
echo "::set-output name=repository::$( echo "${{ github.repository }}" )"
183186
echo "::set-output name=repository_owner::$( echo "${{ github.repository_owner }}" )"
184-
echo "::set-output name=repository_name::$( echo "${{ github.event.repository.name }}" )"
185-
echo "::set-output name=branch::$( echo "${{ github.event.repository.default_branch }}" )"
187+
echo "::set-output name=repository_name::$( echo "${{ github.repository }}" | sed --regexp-extended --expression 's|${{ github.repository_owner }}\/||g' )"
188+
echo "::set-output name=branch_name::$( echo "${{ github.ref_name }}" )"
189+
echo "::set-output name=branch_ref::$( echo "${{ github.ref }}" )"
186190
echo "::set-output name=channel::$( echo "#development" )"
187191
shell: bash
188192

189193
- name: 'Check out repository'
190194
id: checkout
191195
uses: actions/checkout@v3
192196
with:
193-
ref: '${{ steps.setup.outputs.branch }}'
197+
ref: '${{ steps.setup.outputs.branch_ref }}'
194198

195199
- name: 'Get build version'
196200
id: versioning
@@ -217,5 +221,5 @@ jobs:
217221
fields: |
218222
[
219223
{ "title": "Version", "value": "${{ steps.versioning.outputs.version }}", "short": true }
220-
,{ "title": "Branch", "value": "<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ steps.setup.outputs.branch }}>", "short": true }
224+
,{ "title": "Branch", "value": "<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ steps.setup.outputs.branch_name }}>", "short": true }
221225
]

pytest.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[pytest]
2+
DJANGO_SETTINGS_MODULE =
3+
testpaths =
4+
python_files = test_*.py tests.py
5+
addopts = -v -p no:warnings
6+
--ignore=src
7+
--durations=0

0 commit comments

Comments
 (0)