Skip to content

Commit c2a2f97

Browse files
committed
refactor: Some more CI consistency. (#406)
1 parent 143a678 commit c2a2f97

File tree

7 files changed

+32
-34
lines changed

7 files changed

+32
-34
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
integration-tests:
4040
name: Integration tests
4141
needs: fast-checks
42-
if: github.event.pull_request.head.repo.full_name == github.repository
42+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
4343
runs-on: ubuntu-latest
4444
steps:
4545
- uses: actions/checkout@v6
@@ -53,7 +53,7 @@ jobs:
5353
version: ${{ env.HELM_VERSION }}
5454

5555
- name: Set release name
56-
run: echo "RELEASE_NAME=eoapi-$(echo "${{ github.sha }}" | cut -c1-8)" >> "$GITHUB_ENV"
56+
run: echo "RELEASE_NAME=eoapi-${GITHUB_SHA::8}" >> "$GITHUB_ENV"
5757

5858
- name: Clean up disk space
5959
run: |

.github/workflows/pr.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: PR Checks
2+
23
on:
34
pull_request:
4-
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
5+
types: [opened, synchronize, reopened]
56

67
jobs:
7-
pr-title-and-changelog:
8-
name: PR Validation
8+
validate:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout

.github/workflows/release.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,43 @@
1-
name: release helm chart
1+
name: Release Helm Chart
22

33
on:
44
release:
5-
types:
6-
- published
5+
types: [published]
76

87
env:
98
HELM_VERSION: v3.18.3
109

1110
jobs:
1211
release:
13-
if: ${{ !startsWith(github.ref, 'refs/tags/eoapi-') }} # prevent the helm chart releaser from running this release workflow
12+
if: "!startsWith(github.ref, 'refs/tags/eoapi-')"
1413
runs-on: ubuntu-latest
1514
steps:
1615
- uses: actions/checkout@v6
1716
with:
1817
fetch-depth: 0
1918

20-
- name: configure git
19+
- name: Configure git
2120
run: |
22-
git config user.name "$GITHUB_ACTOR"
23-
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
21+
git config user.name "${{ github.actor }}"
22+
git config user.email "${{ github.actor }}@users.noreply.github.com"
2423
2524
- uses: azure/setup-helm@v4
2625
with:
2726
version: ${{ env.HELM_VERSION }}
2827

29-
- name: add helm repos
28+
- name: Add Helm repos
3029
run: |
3130
helm repo add eoapi https://devseed.com/eoapi-k8s/
3231
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
3332
helm repo add grafana https://grafana.github.io/helm-charts
3433
helm repo add bitnami https://charts.bitnami.com/bitnami
3534
helm repo list
3635
37-
- name: run chart-releaser
36+
- name: Run chart-releaser
3837
uses: helm/[email protected]
3938
with:
4039
charts_dir: charts
4140
env:
42-
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
41+
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4342
CR_SKIP_EXISTING: true
4443
CR_INDEX_PATH: "."

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.8.1"
2+
"charts/eoapi": "0.8.1"
33
}

charts/eoapi/profiles/production.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,8 @@ serviceAccount:
358358
create: true
359359
automount: true
360360
annotations: {}
361-
# Add cloud provider annotations if needed
362-
# eks.amazonaws.com/role-arn: arn:aws:iam::ACCOUNT:role/eoapi-role
361+
# Add cloud provider annotations if needed
362+
# eks.amazonaws.com/role-arn: arn:aws:iam::ACCOUNT:role/eoapi-role
363363

364364
######################
365365
# GENERAL SETTINGS

release-please-config.json

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
{
22
"packages": {
3-
".": {
3+
"charts/eoapi": {
44
"release-type": "helm",
5-
"extra-files": [
6-
{
7-
"type": "yaml",
8-
"path": "charts/eoapi/Chart.yaml",
9-
"jsonpath": "$.version"
10-
},
11-
{
12-
"type": "yaml",
13-
"path": "charts/eoapi/Chart.yaml",
14-
"jsonpath": "$.appVersion"
15-
},
16-
"charts/eoapi/README.md"
5+
"extra-files": ["README.md"],
6+
"changelog-sections": [
7+
{"type": "feat", "section": "Added"},
8+
{"type": "fix", "section": "Fixed"},
9+
{"type": "refactor", "section": "Changed"},
10+
{"type": "chore", "section": "Maintenance", "hidden": false},
11+
{"type": "docs", "section": "Other", "hidden": false},
12+
{"type": "test", "section": "Other", "hidden": false},
13+
{"type": "ci", "section": "Other", "hidden": false},
14+
{"type": "perf", "section": "Other", "hidden": false},
15+
{"type": "build", "section": "Other", "hidden": false},
16+
{"type": "style", "section": "Other", "hidden": false},
17+
{"type": "revert", "section": "Other", "hidden": false}
1718
]
1819
}
1920
}

tests/conftest.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,6 @@ def get_pod_count(namespace: str, service_name: str) -> int:
244244
return 0
245245

246246
pods = json.loads(result.stdout)
247-
running_pods = [
248-
pod for pod in pods["items"] if pod["status"]["phase"] == "Running"
249-
]
247+
running_pods = [pod for pod in pods["items"] if pod["status"]["phase"] == "Running"]
250248

251249
return len(running_pods)

0 commit comments

Comments
 (0)