-
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.
- Loading branch information
Showing
4 changed files
with
280 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: k6 Load Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
run-test: | ||
runs-on: ubuntu-latest | ||
container: docker://golang:1.17-alpine | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install xk6 | ||
run: go install go.k6.io/xk6/cmd/xk6@latest | ||
|
||
- name: Build xk6-counter binary | ||
run: xk6 build --with github.com/avitalique/xk6-file@latest | ||
|
||
- name: Run k6 to generate tokens | ||
run: ./k6 run performance-tests/test/src/test.js | ||
env: | ||
env: ${{ secrets.YTENVIRONMENT }} | ||
tokengenuser: ${{ secrets.TOKENGENUSER }} | ||
tokengenuserpwd: ${{ secrets.TOKENGENPWD }} | ||
K6_LOG_OUTPUT: stdout | ||
|
||
- name: Setup K6 | ||
uses: grafana/setup-k6-action@v1 | ||
|
||
- name: Run local k6 test | ||
uses: grafana/run-k6-action@v1 | ||
with: | ||
path: performance-tests/test/src/test.js | ||
flags: --http-debug="full" | ||
env: | ||
serviceowner: ${{ secrets.OWNER }} | ||
K6_LOG_OUTPUT: stdout | ||
|
||
- name: Upload test results | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: summary-text | ||
path: stdout.txt | ||
|
||
- name: Upload test results | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: summary-html | ||
path: summary.html | ||
|
||
- name: Upload test results | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: summary-json | ||
path: summary.json |
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,85 @@ | ||
name: k6 Load Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
run-test: | ||
runs-on: ubuntu-latest | ||
#runs-on: ['self-hosted', 'macOS', 'X64'] | ||
#runs-on: ['self-hosted', 'Windows', 'X64'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 'stable' | ||
|
||
- name: Install xk6 | ||
run: go install go.k6.io/xk6/cmd/xk6@latest | ||
|
||
- name: Build xk6-counter binary | ||
working-directory: ./performance-tests/tax-report/src | ||
run: xk6 build --with github.com/avitalique/xk6-file@latest | ||
|
||
- name: Run k6 to generate tokens | ||
working-directory: ./performance-tests/tax-report/src | ||
run: ./k6 run generate-tokens.js | ||
env: | ||
env: ${{ secrets.YTENVIRONMENT }} | ||
tokengenuser: ${{ secrets.TOKENGENUSER }} | ||
tokengenuserpwd: ${{ secrets.TOKENGENPWD }} | ||
|
||
- name: Setup K6 | ||
uses: grafana/setup-k6-action@v1 | ||
|
||
- name: Run local k6 test | ||
uses: grafana/run-k6-action@v1 | ||
with: | ||
path: performance-tests/tax-report/src/tax-report.js | ||
flags: --vus=40 --duration=10m | ||
env: | ||
K6_WEB_DASHBOARD: true | ||
K6_WEB_DASHBOARD_EXPORT: html-report.html | ||
serviceowner: ${{ secrets.OWNER }} | ||
|
||
- name: Upload summary html report | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: summary-html | ||
path: summary.html | ||
- name: Upload extended html report | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: extended-html | ||
path: html-report.html | ||
|
||
- name: Upload summary text report | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: summary-txt | ||
path: stdout.txt | ||
|
||
- name: Upload HTML report to Azure | ||
if: always() | ||
shell: bash | ||
run: | | ||
REPORT_DIR='taxreports' | ||
azcopy cp --recursive "*.html" "https://altinnloadtests.blob.core.windows.net/\$web/$REPORT_DIR" | ||
azcopy cp --recursive "stdout.txt" "https://altinnloadtests.blob.core.windows.net/\$web/$REPORT_DIR" | ||
echo "::Link to test results summary: title=HTML report url::https://altinnloadtests.z1.web.core.windows.net/$REPORT_DIR/summary.html" | ||
echo "::Link to test results extended: title=HTML report url::https://altinnloadtests.z1.web.core.windows.net/$REPORT_DIR/html-report.html" | ||
echo "::Link to test results summary text: title=TXT report url::https://altinnloadtests.z1.web.core.windows.net/$REPORT_DIR/stdout.txt" | ||
env: | ||
AZCOPY_AUTO_LOGIN_TYPE: SPN | ||
AZCOPY_SPA_APPLICATION_ID: ${{ secrets.AZCOPY_SPA_APPLICATION_ID }} | ||
AZCOPY_SPA_CLIENT_SECRET: ${{ secrets.AZCOPY_SPA_CLIENT_SECRET }} | ||
AZCOPY_TENANT_ID: ${{ secrets.AZCOPY_TENANT_ID }} | ||
|
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,49 @@ | ||
name: k6 Load Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
run-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 'stable' | ||
|
||
- name: Install xk6 | ||
run: go install go.k6.io/xk6/cmd/xk6@latest | ||
|
||
- name: Build xk6-counter binary | ||
working-directory: ./performance-tests/tax-report/src | ||
run: xk6 build --with github.com/avitalique/xk6-file@latest | ||
|
||
- name: Run k6 to generate tokens | ||
working-directory: ./performance-tests/tax-report/src | ||
run: ./k6 run generate-tokens.js | ||
env: | ||
env: ${{ secrets.YTENVIRONMENT }} | ||
tokengenuser: ${{ secrets.TOKENGENUSER }} | ||
tokengenuserpwd: ${{ secrets.TOKENGENPWD }} | ||
limit: 1 | ||
|
||
- name: Setup K6 | ||
uses: grafana/setup-k6-action@v1 | ||
|
||
- name: Run local k6 test | ||
uses: grafana/run-k6-action@v1 | ||
with: | ||
path: performance-tests/tax-report/src/tax-report.js | ||
flags: --vus=1 --iterations=1 | ||
env: | ||
K6_WEB_DASHBOARD: true | ||
K6_WEB_DASHBOARD_EXPORT: html-report.html | ||
serviceowner: ${{ secrets.OWNER }} | ||
|
||
|
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,85 @@ | ||
name: k6 Load Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
run-test: | ||
runs-on: ubuntu-latest | ||
#runs-on: ['self-hosted', 'macOS', 'X64'] | ||
#runs-on: ['self-hosted', 'Windows', 'X64'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 'stable' | ||
|
||
- name: Install xk6 | ||
run: go install go.k6.io/xk6/cmd/xk6@latest | ||
|
||
- name: Build xk6-counter binary | ||
working-directory: ./performance-tests/tax-report/src | ||
run: xk6 build --with github.com/avitalique/xk6-file@latest | ||
|
||
- name: Run k6 to generate tokens | ||
working-directory: ./performance-tests/tax-report/src | ||
run: ./k6 run generate-tokens.js | ||
env: | ||
env: ${{ secrets.YTENVIRONMENT }} | ||
tokengenuser: ${{ secrets.TOKENGENUSER }} | ||
tokengenuserpwd: ${{ secrets.TOKENGENPWD }} | ||
|
||
- name: Setup K6 | ||
uses: grafana/setup-k6-action@v1 | ||
|
||
- name: Run local k6 test | ||
uses: grafana/run-k6-action@v1 | ||
with: | ||
path: performance-tests/tax-report/src/tax-report.js | ||
flags: --vus=40 --duration=10m | ||
env: | ||
K6_WEB_DASHBOARD: true | ||
K6_WEB_DASHBOARD_EXPORT: html-report.html | ||
serviceowner: ${{ secrets.OWNER }} | ||
|
||
- name: Upload summary html report | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: summary-html | ||
path: summary.html | ||
- name: Upload extended html report | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: extended-html | ||
path: html-report.html | ||
|
||
- name: Upload summary text report | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: summary-txt | ||
path: stdout.txt | ||
|
||
- name: Upload HTML report to Azure | ||
if: always() | ||
shell: bash | ||
run: | | ||
REPORT_DIR='taxreports' | ||
azcopy cp --recursive "*.html" "https://altinnloadtests.blob.core.windows.net/\$web/$REPORT_DIR" | ||
azcopy cp --recursive "stdout.txt" "https://altinnloadtests.blob.core.windows.net/\$web/$REPORT_DIR" | ||
echo "::Link to test results summary: title=HTML report url::https://altinnloadtests.z1.web.core.windows.net/$REPORT_DIR/summary.html" | ||
echo "::Link to test results extended: title=HTML report url::https://altinnloadtests.z1.web.core.windows.net/$REPORT_DIR/html-report.html" | ||
echo "::Link to test results summary text: title=TXT report url::https://altinnloadtests.z1.web.core.windows.net/$REPORT_DIR/stdout.txt" | ||
env: | ||
AZCOPY_AUTO_LOGIN_TYPE: SPN | ||
AZCOPY_SPA_APPLICATION_ID: ${{ secrets.AZCOPY_SPA_APPLICATION_ID }} | ||
AZCOPY_SPA_CLIENT_SECRET: ${{ secrets.AZCOPY_SPA_CLIENT_SECRET }} | ||
AZCOPY_TENANT_ID: ${{ secrets.AZCOPY_TENANT_ID }} | ||
|