Skip to content

Commit

Permalink
Merge branch 'main' into feat/remove-filtering-of-empty-collections-w…
Browse files Browse the repository at this point in the history
…hen-serializing
  • Loading branch information
oskogstad authored Oct 31, 2024
2 parents c9257b1 + 94c5544 commit 316478a
Show file tree
Hide file tree
Showing 164 changed files with 4,416 additions and 4,298 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/dispatch-k6-performance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Run K6 performance test

on:
workflow_dispatch:
inputs:
apiVersion:
description: 'API Version'
required: true
default: 'v1'
environment:
description: 'Environment'
required: true
default: 'staging'
type: choice
options:
- test
- staging
- performance
tokens:
description: 'Tokens to generate; for create dialog, search, none, or both'
required: true
default: 'both'
type: choice
options:
- both
- enterprise
- personal
- none
vus:
description: 'Number of VUS'
required: true
type: number
default: 10
duration:
description: 'Duration of test, ie 30s, 1m, 10m'
required: true
default: 1m
type: string
testSuitePath:
description: 'Path to test suite to run'
required: true
default: 'tests/k6/tests/serviceowner/performance/create-dialog.js'

jobs:
k6-performance:
name: "Run K6 performance test"
uses: ./.github/workflows/workflow-run-k6-performance.yml
secrets:
TOKEN_GENERATOR_USERNAME: ${{ secrets.TOKEN_GENERATOR_USERNAME }}
TOKEN_GENERATOR_PASSWORD: ${{ secrets.TOKEN_GENERATOR_PASSWORD }}
K6_CLOUD_TOKEN: ${{ secrets.K6_CLOUD_TOKEN }}
K6_CLOUD_PROJECT_ID: ${{ secrets.K6_CLOUD_PROJECT_ID }}
with:
environment: ${{ inputs.environment }}
apiVersion: ${{ inputs.apiVersion }}
testSuitePath: ${{ inputs.testSuitePath }}
vus: ${{ inputs.vus }}
duration: ${{ inputs.duration }}
tokens: ${{ inputs.tokens }}

55 changes: 55 additions & 0 deletions .github/workflows/workflow-run-k6-performance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Run K6 performance tests

on:
workflow_call:
inputs:
apiVersion:
required: true
type: string
environment:
required: true
type: string
testSuitePath:
required: true
type: string
vus:
required: true
type: number
duration:
required: true
type: string
tokens:
required: true
type: string
secrets:
TOKEN_GENERATOR_USERNAME:
required: true
TOKEN_GENERATOR_PASSWORD:
required: true
K6_CLOUD_TOKEN:
required: true
K6_CLOUD_PROJECT_ID:
required: true

jobs:
k6-test:
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup k6
uses: grafana/setup-k6-action@v1
- name: Run K6 tests (${{ inputs.testSuitePath }})
run: |
./tests/k6/tests/scripts/generate_tokens.sh ./tests/k6/tests/performancetest_data ${{ inputs.tokens }}
k6 run ${{ inputs.testSuitePath }} --quiet --log-output=stdout --include-system-env-vars --vus=${{ inputs.vus }} --duration=${{ inputs.duration }}
env:
API_ENVIRONMENT: ${{ inputs.environment }}
API_VERSION: ${{ inputs.apiVersion }}
TOKEN_GENERATOR_USERNAME: ${{ secrets.TOKEN_GENERATOR_USERNAME }}
TOKEN_GENERATOR_PASSWORD: ${{ secrets.TOKEN_GENERATOR_PASSWORD }}
K6_CLOUD_TOKEN: ${{ secrets.K6_CLOUD_TOKEN }}
K6_CLOUD_PROJECT_ID: ${{ secrets.K6_CLOUD_PROJECT_ID }}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -374,3 +374,10 @@ FodyWeavers.xsd

# MacOS
.DS_Store

# Secrets file used by act
.secrets

# Generated files with tokens
**/.endusers-with-tokens.csv
**/.serviceowners-with-tokens.csv
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [1.27.1](https://github.com/digdir/dialogporten/compare/v1.27.0...v1.27.1) (2024-10-30)


### Bug Fixes

* Simplify subject attribute matching ([#1348](https://github.com/digdir/dialogporten/issues/1348)) ([55159b7](https://github.com/digdir/dialogporten/commit/55159b772578e58d3406dd8028e9c14d9b3254e1))

## [1.27.0](https://github.com/digdir/dialogporten/compare/v1.26.3...v1.27.0) (2024-10-29)


Expand Down
Loading

0 comments on commit 316478a

Please sign in to comment.