-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* lint it
- Loading branch information
Showing
6 changed files
with
155 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,17 +5,58 @@ on: | |
branches: [ "master" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm run lint | ||
- run: npm run build:ts | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: "npm" | ||
- run: npm ci | ||
- run: npm run lint | ||
- run: npm run build:ts | ||
|
||
helm: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: v3.12.1 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
check-latest: true | ||
- uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) | ||
if [[ -n "$changed" ]]; then | ||
echo "changed=true" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: install helm dependencies | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: | | ||
helm dependency update charts/* | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm plugin install https://github.com/helm-unittest/helm-unittest.git | ||
- name: Run chart-testing (lint) | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: ct lint --target-branch ${{ github.event.repository.default_branch }} | ||
|
||
# run helm unittest | ||
- name: Run helm lint | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: helm lint charts/* | ||
- name: Run helm unittest | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: helm unittest charts/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
Matches the snapshot: | ||
1: | | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app.kubernetes.io/instance: RELEASE-NAME | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/name: timelimit | ||
app.kubernetes.io/version: 1.17.0 | ||
helm.sh/chart: timelimit-0.2.5 | ||
name: RELEASE-NAME-timelimit | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/instance: RELEASE-NAME | ||
app.kubernetes.io/name: timelimit | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/instance: RELEASE-NAME | ||
app.kubernetes.io/name: timelimit | ||
spec: | ||
containers: | ||
- env: | ||
- name: NODE_ENV | ||
value: production | ||
- name: DB_NAME | ||
value: RELEASE-NAME-timelimit | ||
- name: DB_USER | ||
value: RELEASE-NAME-timelimit | ||
- name: DB_PORT | ||
value: "3306" | ||
- name: DB_HOST | ||
value: RELEASE-NAME-timelimit-mariadb | ||
- name: DB_PASS | ||
value: "" | ||
- name: PORT | ||
value: "8080" | ||
- name: ALWAYS_PRO | ||
value: "no" | ||
- name: ADMIN_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
key: the-key | ||
name: the-secret-name | ||
image: ghcr.io/michaelsp/timelimit-server/timelimit:latest | ||
imagePullPolicy: IfNotPresent | ||
livenessProbe: | ||
httpGet: | ||
path: /time | ||
port: 8080 | ||
name: timelimit | ||
ports: | ||
- containerPort: 8080 | ||
name: http | ||
protocol: TCP | ||
readinessProbe: | ||
httpGet: | ||
path: /time | ||
port: 8080 | ||
resources: {} | ||
securityContext: {} | ||
securityContext: {} | ||
serviceAccountName: RELEASE-NAME-timelimit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
suite: email Test Suite | ||
templates: | ||
- deployment.yaml | ||
tests: | ||
- it: Matches the snapshot | ||
asserts: | ||
- matchSnapshot: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters