Skip to content
Open
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
19 changes: 11 additions & 8 deletions .github/workflows/merge-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,22 @@ on:
branches:
- develop

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

jobs:
coverage:
runs-on: ubuntu-latest
if: github.repository == 'NHSDigital/nhs-context-logging' && !contains(github.event.head_commit.message, 'tag release version:')
permissions:
contents: write
checks: write
pull-requests: write
steps:
- name: checkout
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: setup python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.8"

Expand Down Expand Up @@ -68,7 +67,7 @@ jobs:
if: github.actor != 'dependabot[bot]' && (success() || failure())
run: |
export SONAR_VERSION="4.7.0.2747"
wget -q "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_VERSION}.zip" -O sonar-scanner.zip
wget -q --max-redirect=0 "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_VERSION}.zip" -O sonar-scanner.zip
unzip -q ./sonar-scanner.zip
mv ./sonar-scanner-${SONAR_VERSION} ./sonar-scanner
scripts/sonar_tests.py
Expand All @@ -92,6 +91,10 @@ jobs:
publish:
runs-on: ubuntu-latest
if: github.repository == 'NHSDigital/nhs-context-logging' && github.actor != 'dependabot[bot]' && !contains(github.event.head_commit.message, 'tag release version:')
permissions:
contents: write
checks: write
pull-requests: write
steps:
- name: checkout
uses: actions/checkout@v5
Expand All @@ -104,7 +107,7 @@ jobs:
find . -type f | xargs chmod g+w

- name: setup python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.8"

Expand Down
31 changes: 21 additions & 10 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ on:
branches:
- develop

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

jobs:
tox:
strategy:
Expand All @@ -17,6 +12,10 @@ jobs:

runs-on: ubuntu-latest
if: github.repository == 'NHSDigital/nhs-context-logging'
permissions:
contents: write
checks: write
pull-requests: write
steps:
- name: checkout
uses: actions/checkout@v5
Expand Down Expand Up @@ -47,7 +46,7 @@ jobs:
git merge --ff-only "${{ github.event.pull_request.head.sha }}"

- name: setup python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -60,6 +59,10 @@ jobs:
coverage:
runs-on: ubuntu-latest
if: github.repository == 'NHSDigital/nhs-context-logging'
permissions:
contents: write
checks: write
pull-requests: write
steps:
- name: checkout
uses: actions/checkout@v5
Expand Down Expand Up @@ -93,7 +96,7 @@ jobs:
git merge --ff-only "${{ github.event.pull_request.head.sha }}"

- name: setup python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.8"

Expand Down Expand Up @@ -144,7 +147,7 @@ jobs:
if: github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork && (success() || failure())
run: |
export SONAR_VERSION="4.7.0.2747"
wget -q "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_VERSION}.zip" -O sonar-scanner.zip
wget -q --max-redirect=0 "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_VERSION}.zip" -O sonar-scanner.zip
unzip -q ./sonar-scanner.zip
mv ./sonar-scanner-${SONAR_VERSION} ./sonar-scanner
scripts/sonar_tests.py
Expand Down Expand Up @@ -180,6 +183,10 @@ jobs:
lint:
runs-on: ubuntu-latest
if: github.repository == 'NHSDigital/nhs-context-logging'
permissions:
contents: write
checks: write
pull-requests: write
steps:
- name: checkout
uses: actions/checkout@v5
Expand All @@ -205,7 +212,7 @@ jobs:
git merge --ff-only "${{ github.event.pull_request.head.sha }}"

- name: setup python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.8"

Expand Down Expand Up @@ -257,6 +264,10 @@ jobs:
publish:
runs-on: ubuntu-latest
if: github.repository == 'NHSDigital/nhs-context-logging' && github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork
permissions:
contents: write
checks: write
pull-requests: write
needs:
- coverage
- lint
Expand Down Expand Up @@ -291,7 +302,7 @@ jobs:
git merge --ff-only "${{ github.event.pull_request.head.sha }}"

- name: setup python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.8"

Expand Down
Loading