Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2

updates:
- package-ecosystem: "pip"
directory: "/" # Location of package manifests
directory: "/"
commit-message:
prefix: "MESH-2092 "
schedule:
interval: "monthly"
groups:
dependencies:
patterns:
- "*"

- package-ecosystem: "github-actions"
directory: "/"
commit-message:
prefix: "MESH-2092 "
schedule:
interval: "monthly"
interval: "monthly"
groups:
dependencies:
patterns:
- "*"
35 changes: 20 additions & 15 deletions .github/workflows/merge-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,28 @@ on:
branches:
- develop

jobs:
permissions:
contents: write
checks: write
pull-requests: write

jobs:
coverage:
runs-on: ubuntu-latest
if: github.repository == 'NHSDigital/mesh-sandbox' && !contains(github.event.head_commit.message, 'tag release version:')
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: setup python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version-file: "pyproject.toml"

- name: setup poetry
uses: abatilo/actions-poetry@v2
uses: abatilo/actions-poetry@0dd19c9498c3dc8728967849d0d2eae428a8a3d8
with:
poetry-version: 1.5.1

Expand All @@ -30,7 +34,7 @@ jobs:
poetry self add "poetry-dynamic-versioning[plugin]"

- name: cache virtualenv
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.venv
Expand All @@ -49,7 +53,7 @@ jobs:

- name: setup java
if: success() || failure()
uses: actions/setup-java@v3
uses: actions/setup-java@v5
with:
distribution: "corretto"
java-version: "11"
Expand All @@ -70,7 +74,7 @@ jobs:

- name: setup java
if: github.actor != 'dependabot[bot]' && (success() || failure())
uses: actions/setup-java@v3
uses: actions/setup-java@v5
with:
distribution: "corretto"
java-version: "17"
Expand All @@ -95,7 +99,7 @@ jobs:

- name: publish junit reports
if: success() || failure()
uses: mikepenz/action-junit-report@v2
uses: mikepenz/action-junit-report@3585e9575db828022551b4231f165eb59a0e74e3
with:
check_name: junit reports
report_paths: reports/junit/*.xml
Expand All @@ -104,13 +108,12 @@ jobs:
if: success() || failure()
run: make down


publish:
runs-on: ubuntu-latest
if: github.repository == 'NHSDigital/mesh-sandbox' && github.actor != 'dependabot[bot]' && !contains(github.event.head_commit.message, 'tag release version:')
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v5
with:
fetch-depth: 0

Expand All @@ -120,12 +123,12 @@ jobs:
find . -type f | xargs chmod g+w

- name: setup python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version-file: "pyproject.toml"

- name: setup poetry
uses: abatilo/actions-poetry@v2
uses: abatilo/actions-poetry@0dd19c9498c3dc8728967849d0d2eae428a8a3d8
with:
poetry-version: 1.5.1

Expand All @@ -151,8 +154,10 @@ jobs:
release_name: ${{ env.RELEASE_VERSION }}

- name: poetry config
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry config pypi-token.pypi "$POETRY_PYPI_TOKEN_PYPI"

- name: poetry publish
run: poetry publish
79 changes: 46 additions & 33 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ on:
branches:
- develop

jobs:
permissions:
contents: write
checks: write
pull-requests: write

jobs:
coverage:
runs-on: ubuntu-latest
if: github.repository == 'NHSDigital/mesh-sandbox'
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v5
with:
fetch-depth: 0

Expand All @@ -33,19 +37,22 @@ jobs:
- name: merge into base_branch
if: ${{ github.event_name == 'pull_request' }}
run: |
echo base branch "${{ github.base_ref }}"
echo pr branch "${{ github.head_ref }}"
git checkout "${{ github.base_ref }}"
echo base branch "$BASE_BRANCH"
echo pr branch "$PR_BRANCH"
git checkout "$BASE_BRANCH"
git checkout -b "merging-${{ github.event.number }}"
git merge --ff-only "${{ github.event.pull_request.head.sha }}"
env:
BASE_BRANCH: ${{ github.base_ref }}
PR_BRANCH: ${{ github.head_ref }}

- name: setup python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version-file: "pyproject.toml"

- name: setup poetry
uses: abatilo/actions-poetry@v2
uses: abatilo/actions-poetry@0dd19c9498c3dc8728967849d0d2eae428a8a3d8
with:
poetry-version: 1.5.1

Expand All @@ -54,7 +61,7 @@ jobs:
poetry self add "poetry-dynamic-versioning[plugin]"

- name: cache virtualenv
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.venv
Expand All @@ -76,7 +83,7 @@ jobs:

- name: setup java
if: success() || failure()
uses: actions/setup-java@v3
uses: actions/setup-java@v5
with:
distribution: "corretto"
java-version: "11"
Expand All @@ -97,7 +104,7 @@ jobs:

- name: setup java
if: github.actor != 'dependabot[bot]' && (success() || failure())
uses: actions/setup-java@v3
uses: actions/setup-java@v5
with:
distribution: "corretto"
java-version: "17"
Expand Down Expand Up @@ -134,7 +141,7 @@ jobs:

- name: publish junit reports
if: success() || failure()
uses: mikepenz/action-junit-report@v3
uses: mikepenz/action-junit-report@3585e9575db828022551b4231f165eb59a0e74e3
with:
check_name: junit reports
report_paths: reports/junit/*.xml
Expand All @@ -148,7 +155,7 @@ jobs:
if: github.repository == 'NHSDigital/mesh-sandbox'
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v5
with:
fetch-depth: 0

Expand All @@ -162,19 +169,22 @@ jobs:
- name: merge into base_branch
if: ${{ github.event_name == 'pull_request' }}
run: |
echo base branch "${{ github.base_ref }}"
echo pr branch "${{ github.head_ref }}"
git checkout "${{ github.base_ref }}"
echo base branch "$BASE_BRANCH"
echo pr branch "$PR_BRANCH"
git checkout "$BASE_BRANCH"
git checkout -b "merging-${{ github.event.number }}"
git merge --ff-only "${{ github.event.pull_request.head.sha }}"
env:
BASE_BRANCH: ${{ github.base_ref }}
PR_BRANCH: ${{ github.head_ref }}

- name: setup python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version-file: "pyproject.toml"

- name: setup poetry
uses: abatilo/actions-poetry@v2
uses: abatilo/actions-poetry@0dd19c9498c3dc8728967849d0d2eae428a8a3d8
with:
poetry-version: 1.5.1

Expand All @@ -183,7 +193,7 @@ jobs:
poetry self add "poetry-dynamic-versioning[plugin]"

- name: cache virtualenv
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.venv
Expand All @@ -205,21 +215,20 @@ jobs:
run: make mypy

- name: hadolint
uses: hadolint/hadolint-action@master
uses: hadolint/hadolint-action@5d0317e9d0d2c15b383fbc7433e9d0aed07ec660
with:
dockerfile: "Dockerfile"
recursive: true
config: ./hadolint.yml

- name: shellcheck
uses: ludeeus/action-shellcheck@master
uses: ludeeus/action-shellcheck@00b27aa7cb85167568cb48a3838b75f4265f2bca
with:
ignore_paths: .venv build
ignore_names: git-secrets
env:
SHELLCHECK_OPTS: -f gcc -e SC1090,SC1091


publish:
runs-on: ubuntu-latest
if: github.repository == 'NHSDigital/mesh-sandbox' && github.actor != 'dependabot[bot]'
Expand All @@ -228,7 +237,7 @@ jobs:
- lint
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v5
with:
fetch-depth: 0

Expand All @@ -247,19 +256,22 @@ jobs:
- name: merge into base_branch
if: ${{ github.event_name == 'pull_request' }}
run: |
echo base branch "${{ github.base_ref }}"
echo pr branch "${{ github.head_ref }}"
git checkout "${{ github.base_ref }}"
echo base branch "$BASE_BRANCH"
echo pr branch "$PR_BRANCH"
git checkout "$BASE_BRANCH"
git checkout -b "merging-${{ github.event.number }}"
git merge --ff-only "${{ github.event.pull_request.head.sha }}"
env:
BASE_BRANCH: ${{ github.base_ref }}
PR_BRANCH: ${{ github.head_ref }}

- name: setup python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version-file: "pyproject.toml"

- name: setup poetry
uses: abatilo/actions-poetry@v2
uses: abatilo/actions-poetry@0dd19c9498c3dc8728967849d0d2eae428a8a3d8
with:
poetry-version: 1.5.1

Expand All @@ -268,7 +280,7 @@ jobs:
poetry self add "poetry-dynamic-versioning[plugin]"

- name: cache virtualenv
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.venv
Expand All @@ -285,10 +297,11 @@ jobs:
poetry build --format=wheel

- name: poetry config
env:
POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.TEST_PYPI_TOKEN }}
run: |
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_TOKEN }}
poetry config pypi-token.testpypi "$POETRY_PYPI_TOKEN_TESTPYPI"

- name: poetry test publish
run: poetry publish -r testpypi

2 changes: 1 addition & 1 deletion .github/workflows/scheduled-combine-dependabot-prs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
steps:
- name: combine-prs
id: combine-prs
uses: github/combine-prs@v5.0.0
uses: actions/combine-prs@v5.2.0
with:
ci_required: ${{ inputs.ci_required == 'YES' }}
labels: dependencies
Expand Down
6 changes: 3 additions & 3 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
poetry 1.5.1
python 3.9.13
java corretto-11.0.17.8.1
poetry 2.1.2
python 3.11.11
java corretto-11.0.26.4.1
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-slim-bullseye@sha256:cb47448b7dd1bf0895916c1defab259ed795cb0b531487156c5499298dc3dc8b
FROM python:3.11-slim-bullseye@sha256:53ebfd268fe58ccd405688b3305a7dcad5da03f5e3957126a40c9e59d0962ed0

WORKDIR /app

Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ docker compose
--------------

```yaml
version: '3.9'


services:

Expand Down
Loading