Skip to content

Commit 27bac7c

Browse files
authored
Merge pull request #245 from NHSDigital/mesh-0000-update-project-tooling
Mesh-0000 update project tooling
2 parents 79d59be + 570d8a7 commit 27bac7c

16 files changed

+928
-752
lines changed

.github/dependabot.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,20 @@ updates:
88
- package-ecosystem: "pip"
99
directory: "/" # Location of package manifests
1010
schedule:
11-
interval: "monthly"
11+
interval: "weekly"
12+
cooldown:
13+
default-days: 7
1214

1315
- package-ecosystem: "npm"
1416
directory: "/" # Location of package manifests
1517
schedule:
16-
interval: "monthly"
18+
interval: "weekly"
19+
cooldown:
20+
default-days: 7
21+
22+
- package-ecosystem: "github-actions"
23+
directory: "/"
24+
schedule:
25+
interval: "weekly"
26+
cooldown:
27+
default-days: 7
Lines changed: 41 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,51 @@
1-
name: Build
2-
3-
on: push
4-
5-
jobs:
6-
build:
7-
name: build
8-
runs-on: ubuntu-latest
9-
steps:
10-
- name: Checkout
11-
uses: actions/checkout@v4
12-
with:
13-
fetch-depth: 0 # This causes all history to be fetched, which is required for calculate-version to function
14-
15-
- name: Install Python 3.8
16-
uses: actions/setup-python@v4
17-
with:
18-
python-version: 3.8
19-
20-
- name: Update apt repositories
21-
run: sudo apt update
22-
23-
- name: Install Java and Node
24-
run: sudo apt-get install --yes default-jre default-jdk nodejs
25-
26-
- name: Upgrade python packaging tools
27-
run: python -m pip install --upgrade pip setuptools wheel
28-
29-
- name: Install poetry
30-
run: pip install poetry
31-
32-
- name: Cache poetry packages
33-
uses: actions/cache@v3
34-
with:
35-
path: ~/.cache/pypoetry
36-
key: ${{ runner.os }}-build-cache-poetry-packages-${{ hashFiles('**/poetry.lock') }}
37-
38-
- name: Cache node modules
39-
uses: actions/cache@v3
40-
with:
41-
path: ~/.npm
42-
key: ${{ runner.os }}-build-cache-npm-packages-${{ hashFiles('**/package-lock.json') }}
43-
44-
- name: Install repo
45-
run: make install
46-
1+
name: Build
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
name: build
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
12+
with:
13+
fetch-depth: 0 # This causes all history to be fetched, which is required for calculate-version to function
14+
15+
- name: Install Java
16+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
17+
with:
18+
distribution: 'temurin'
19+
java-version-file: '.tool-versions'
20+
21+
- name: Install Node
22+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
23+
with:
24+
node-version-file: '.tool-versions'
25+
cache: 'npm'
26+
27+
- name: Install poetry
28+
run: pipx install poetry==$(grep '^poetry ' .tool-versions | awk '{print $2}')
29+
30+
- name: Install Python
31+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
32+
with:
33+
python-version-file: '.tool-versions'
34+
cache: 'poetry'
35+
36+
- name: Install repo
37+
run: make install
38+
4739
- name: Set SPEC_VERSION env var
48-
run: echo ::set-env name=SPEC_VERSION::$(poetry run python scripts/calculate_version.py)
49-
env:
50-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
40+
run: echo "SPEC_VERSION=$(poetry run python scripts/calculate_version.py)" >> $GITHUB_ENV
5141

5242
- name: Create release (master only)
5343
id: create-release
5444
if: github.ref == 'refs/heads/master'
55-
uses: actions/create-release@v1
45+
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
5646
continue-on-error: true
5747
env:
5848
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5949
with:
6050
tag_name: ${{ env.SPEC_VERSION }}
61-
release_name: ${{ env.SPEC_VERSION }}
51+
name: ${{ env.SPEC_VERSION }}

.github/workflows/pr-lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
env:
1616
PR_REF: ${{ github.event.pull_request.head.ref }}
1717
run: |
18-
TICKET_NAME=$(echo "$PR_REF" | grep -i -o '\(\(apm\|mesh\|mesh2cloud\|spinecore\|spii\|apmspii\|amp\)-[0-9]\+\)' | tr '[:lower:]' '[:upper:]')
18+
TICKET_NAME=$(echo "$PR_REF" | grep -i -o '\(\(apm\|mesh\|mesh2cloud\|spinecore\|spii\|apmspii\|amp\|mns\)-[0-9]\+\)' | tr '[:lower:]' '[:upper:]')
1919
echo "TICKET_NAME=$TICKET_NAME" >> $GITHUB_ENV
2020
2121
- name: Comment on PR
2222
if: contains(github.event.pull_request.head.ref, 'apm-') || contains(github.event.pull_request.head.ref, 'APM-') || contains(github.event.pull_request.head.ref, 'mesh-') || contains(github.event.pull_request.head.ref, 'MESH-') || contains(github.event.pull_request.head.ref, 'mesh2cloud-') || contains(github.event.pull_request.head.ref, 'MESH2CLOUD-') || contains(github.event.pull_request.head.ref, 'spii-') || contains(github.event.pull_request.head.ref, 'SPII-') || contains(github.event.pull_request.head.ref, 'spinecore-') || contains(github.event.pull_request.head.ref, 'SPINECORE-')
23-
uses: unsplash/comment-on-pr@master
23+
uses: unsplash/comment-on-pr@ffe8f97ccc63ce12c3c23c6885b169db67958d3b # v1.3.0
2424
env:
2525
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2626
with:

.github/workflows/scheduled-combine-dependabot-prs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
steps:
2626
- name: combine-prs
2727
id: combine-prs
28-
uses: github/combine-prs@v5.0.0
28+
uses: github/combine-prs@2909f404763c3177a456e052bdb7f2e85d3a7cb3 # v5.2.0
2929
with:
3030
ci_required: ${{ inputs.ci_required == 'YES' }}
3131
labels: dependencies

.tool-versions

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
python 3.8.18
2-
nodejs 24.7.0
3-
poetry 1.8.5
1+
python 3.13.12
2+
nodejs 24.14.1
3+
poetry 2.3.3
4+
java temurin-21.0.10+7.0.LTS

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ check-licenses:
4444
scripts/check_python_licenses.sh
4545

4646
format:
47-
poetry run black **/*.py
47+
poetry run black .
4848

4949
release: clean publish
5050
mkdir -p dist

openapitools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
33
"spaces": 2,
44
"generator-cli": {
5-
"version": "7.14.0"
5+
"version": "7.21.0"
66
}
77
}

0 commit comments

Comments
 (0)