Skip to content

Commit

Permalink
chore: setup job
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie authored Aug 8, 2024
1 parent 8a08b0c commit 50b2f84
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 31 deletions.
47 changes: 25 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,39 @@ on:
workflow_call:
push:
branches:
- main
- release/*
- main
- release/*
pull_request:
branches:
- main
- main

jobs:
test:
runs-on: ubuntu-latest
permissions:
checks: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- run: sudo apt-get update && sudo apt install -y libxml2-dev libxslt1-dev liblzma-dev zlib1g-dev
- run: make test
- uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Go Test Results
path: .test/reports/**-test.xml
reporter: java-junit
fail-on-error: 'true'
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: Test Reports
path: .test/reports/**
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
cache-dependency-path: |
subdir/go.sum
tools/go.sum
- run: sudo apt-get update && sudo apt install -y libxml2-dev libxslt1-dev liblzma-dev zlib1g-dev
- run: make test
- uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Go Test Results
path: .test/reports/**-test.xml
reporter: java-junit
fail-on-error: "true"
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: Test Reports
path: .test/reports/**

lint:
runs-on: ubuntu-latest
Expand All @@ -45,4 +48,4 @@ jobs:
with:
go-version-file: ./go.mod
check-latest: true
- run: make lint
- run: make lint
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
cache-dependency-path: |
go.sum
tools/go.sum
- uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ${{ env.REGISTRY }}
Expand Down Expand Up @@ -70,8 +73,3 @@ jobs:
config: helm/cr.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/upload-artifact@v4
with:
name: manifests
path: /tmp/dist
retention-days: 14
8 changes: 4 additions & 4 deletions helm/charts/service-lens/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,22 @@ spec:
args: ["migrate"]
env:
{{- if .Values.database.prefix }}
- name: service-lens_DATABASE_TABLE_PREFIX
- name: SERVICE_LENS_DATABASE_TABLE_PREFIX
value: "{{ .Values.database.prefix }}"
{{- end }}
{{- if .Values.database.uri }}
- name: service-lens_DATABASE_URI
- name: SERVICE_LENS_DATABASE_URI
value: "{{ .Values.database.uri }}"
{{- else if .Values.database.uriSecret }}
- name: service-lens_DATABASE_URI
- name: SERVICE_LENS_DATABASE_URI
valueFrom:
secretKeyRef:
name: "{{ .Values.database.uriSecret }}"
key: "uri"
{{- end }}

{{- if .Values.migrate.timeout }}
- name: service-lens_TIMEOUT
- name: SERVICE_LENS_TIMEOUT
value: "{{ .Values.migrate.timeout }}"
{{- end }}

Expand Down

0 comments on commit 50b2f84

Please sign in to comment.