Skip to content

add stress tests

add stress tests #102

Workflow file for this run

on:
push:
branches:
- main
paths:
- 'reports-service/**'
- 'k8s/manifest/reports/**'
- '.github/workflows/reports.yml'
workflow_dispatch:
jobs:
build:
name: Build reports container
uses: ./.github/workflows/ghcr-push.yml
permissions:
contents: read
packages: write
id-token: write
with:
context: reports-service
dockerfile: reports-service/Dockerfile
image: ${{ github.repository }}-reports
labels: |
org.opencontainers.image.title=Tombo Reports
org.opencontainers.image.description=Tombo Reports Microservice
deploy:
name: Deploy Reports manifests
needs: build
runs-on: ubuntu-latest
environment: prod
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Parse database URL
id: database-url
uses: paoloose/uri-parse-action@v1
with:
uri: ${{ secrets.REPORTS_DATABASE_URL }}
- name: Prepare reports/configmap.yml
uses: danielr1996/envsubst-action@1.0.0
env:
GOOGLE_CLIENT_ID: ${{ vars.GOOGLE_CLIENT_ID }}
with:
input: k8s/manifest/reports/configmap.tmpl.yml
output: k8s/manifest/reports/configmap.yml
- name: Prepare reports/secrets.yml
uses: danielr1996/envsubst-action@1.0.0
env:
REPORTS_POSTGRES_USER: ${{ steps.database-url.outputs.username }}
REPORTS_POSTGRES_PASSWORD: ${{ steps.database-url.outputs.password }}
REPORTS_POSTGRES_DB: ${{ steps.database-url.outputs.path }}
REPORTS_DATABASE_URL: ${{ secrets.REPORTS_DATABASE_URL }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
with:
input: k8s/manifest/reports/secrets.tmpl.yml
output: k8s/manifest/reports/secrets.yml
- name: Prepare reports/service.yml
uses: danielr1996/envsubst-action@1.0.0
env:
REPORTS_CONTAINER: ghcr.io/${{ github.repository }}-reports:sha-${{ github.sha }}
BASE_DOMAIN: ${{ vars.BASE_DOMAIN }}
with:
input: k8s/manifest/reports/service.tmpl.yml
output: k8s/manifest/reports/service.yml
- name: Apply Reports manifests
uses: ./.github/actions/kubectl
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
commands: |
kubectl apply -f k8s/manifest/reports/configmap.yml
kubectl apply -f k8s/manifest/reports/secrets.yml
kubectl apply -f k8s/manifest/reports/database.yml
kubectl apply -f k8s/manifest/reports/service.yml