Skip to content

Commit bd1a363

Browse files
committed
Merge branch 'feature/pep517' into develop
# Conflicts: # .github/workflows/build.yml # .gitignore # .idea/mrmat-python-api-flask.iml # .idea/runConfigurations/build.xml # .idea/runConfigurations/docker__harkonnen_.xml # .idea/runConfigurations/mrmat_python_api_flask__prod_.xml # ci/__init__.py # migrations/versions/d11062fbec93_owners_and_resources.py # mrmat_python_api_flask/__init__.py # mrmat_python_api_flask/apis/greeting/v3/api.py # mrmat_python_api_flask/apis/resource/v1/api.py # requirements.txt
2 parents a2f9122 + fdc1390 commit bd1a363

40 files changed

+688
-605
lines changed

.flake8

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ name: Build
99
env:
1010
MAJOR: 0
1111
MINOR: 0
12-
PYTHON_VERSION: 3.9.6
12+
PYTHON_VERSION: 3.10.1
1313

1414
#
1515
# Establish when the workflow is run
16-
# We do build on every push except when we push onto main (which we ought to be subject to branch protection)
16+
# We do build on every push except when we push onto main (which ought to be subject to branch protection)
1717
# We do build whenever a PR onto main is closed (see on) and the code is actually merged (see release job if)
1818
# Why is that okay?
1919
# Since we're making a PR, we know from the previous workflow run on push that the repo is okay and the PR
@@ -44,7 +44,7 @@ jobs:
4444
- name: Calculate Build Context
4545
run: |
4646
MRMAT_VERSION="${MAJOR}.${MINOR}.${GITHUB_RUN_NUMBER}"
47-
if [ "$GITHUB_EVENT_NAME" == 'pull_request_target' ]; then
47+
if [ "$GITHUB_EVENT_NAME" == 'pull_request_target' && GITHUB_BASE_REF == 'main']; then
4848
MRMAT_IS_RELEASE=true
4949
echo "::warning ::Building release ${MRMAT_VERSION}"
5050
echo "MRMAT_IS_RELEASE=true" >> $GITHUB_ENV
@@ -62,22 +62,16 @@ jobs:
6262
- name: Establish a cache for dependencies
6363
uses: actions/cache@v2
6464
with:
65-
path: ~/.local
65+
path: ${HOME}/.local
6666
key: ${{ runner.os }}
6767

68-
- name: Install dependencies
68+
- name: Build
6969
run: |
70-
python -m pip install --upgrade pip
71-
pip install --user wheel
70+
export PYTHONUSERBASE=${HOME}/.local
7271
pip install --user -r requirements.txt
73-
pip install --user -r test-requirements.txt
74-
75-
- name: Test
76-
run: |
77-
flake8 --statistics
78-
pylint mrmat_python_api_flask
79-
python ./setup.py install
80-
python -m pytest
72+
${PYTHONUSERBASE}/bin/pylint ${GITHUB_WORKSPACE}/mrmat_python_api_flask
73+
PYTHONPATH=${GITHUB_WORKSPACE} python -m pytest --cov=mrmat_python_api_flask
74+
PYTHONPATH=${GITHUB_WORKSPACE} python -m build --wheel -n
8175
8276
- name: Upload test results
8377
uses: actions/upload-artifact@v2
@@ -90,7 +84,7 @@ jobs:
9084
9185
- name: Conditional Release
9286
uses: marvinpinto/action-automatic-releases@latest
93-
if: github.event.pull_request.merged == true
87+
if: (github.event.pull_request.merged == true && github.base_ref == 'main')
9488
with:
9589
repo_token: "${{ secrets.GITHUB_TOKEN }}"
9690
automatic_release_tag: "${{ env.MRMAT_VERSION }}"

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,4 +246,5 @@ dmypy.json
246246

247247
# End of https://www.toptal.com/developers/gitignore/api/jetbrains,python
248248

249-
mrmat_python_api_flask/static
249+
var/terraform/.terraform/
250+
var/terraform/.terraform.lock.hcl

.idea/dataSources.xml

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/markdown.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/mrmat-python-api-flask.iml

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/setup_py__install_.xml renamed to .idea/runConfigurations/build.xml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/client.xml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/docker__harkonnen_.xml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)