Skip to content

Commit 5c1a728

Browse files
authored
Test Release (#9)
* Authenticate/Authorise on resources (#5) * Added PyJWT * Resource API now requires authentication/authorisation * Greeting makes use of the new read fixture * Skipping tests when no OIDC configuration is available * More appropriate permissions * Tests should be running an install the first time they execute * Additional check whether the test configuration file exists * Fixed pylint complaint ... by ignoring the unnecessary lambda that needs to be there * Fixed flake8 complaints * Switching to 'compatible' requirements * Reorganised the build/release workflow (#7) * Enabling coverage measurement again * My YAML style * Version calculation * Pipeline debugging * Pipeline debugging * Pipeline debugging * Pipeline debugging * Pipeline debugging * Finetuning build mech * Re-enabling coverage * Release Testing * Release Testing * Release Testing
1 parent 2b28f63 commit 5c1a728

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@ env:
1313

1414
#
1515
# Establish when the workflow is run
16-
# What we want is that a release is made whenever we merge into master. Here is an example:
17-
# if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true && github.base_ref == 'refs/heads/main' }}
18-
# But really, we can also just say that a push into master causes a release. Whether that must come from a PR
19-
# can be controlled via branch protection
2016

2117
on:
22-
push: {}
18+
push:
19+
branches-ignore:
20+
- master
2321
pull_request: {}
2422

2523
#
@@ -32,7 +30,7 @@ jobs:
3230
steps:
3331

3432
- name: Determine whether this is a release build
35-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
33+
if: ${{ github.event_name == 'pull_request' && github.base_ref == 'refs/heads/main' }}
3634
env:
3735
IS_RELEASE: "true"
3836
run: echo "We will be performing a release upon success"
@@ -45,12 +43,18 @@ jobs:
4543
with:
4644
python-version: ${{ env.PYTHON_VERSION }}
4745

46+
- name: Establish a cache for dependencies
47+
uses: actions/cache@v2
48+
with:
49+
path: ~/.local
50+
key: ${{ runner.os }}
51+
4852
- name: Install dependencies
4953
run: |
5054
python -m pip install --upgrade pip
51-
pip install wheel
52-
pip install -r requirements.txt
53-
pip install -r test-requirements.txt
55+
pip install --user wheel
56+
pip install --user -r requirements.txt
57+
pip install --user -r test-requirements.txt
5458
5559
- name: Lint
5660
run: |

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[pytest]
66
testpaths = tests
7-
#addopts = --cov=mrmat_python_api_flask --cov-report=term --cov-report=xml:build/coverage.xml --junit-xml=build/junit.xml
7+
addopts = --cov=mrmat_python_api_flask --cov-report=term --cov-report=xml:build/coverage.xml --junit-xml=build/junit.xml
88
junit_family = xunit2
99
log_cli = 1
1010
log_cli_level = INFO

0 commit comments

Comments
 (0)