Skip to content

Commit

Permalink
Added bash-script to create tokens (#100)
Browse files Browse the repository at this point in the history
* Added bash-script to create tokens

* Workflows use bash-script to generate tokens
  • Loading branch information
dagfinno authored Nov 27, 2024
1 parent 9cc9d35 commit ec11314
Show file tree
Hide file tree
Showing 7 changed files with 2,891 additions and 54 deletions.
23 changes: 5 additions & 18 deletions .github/workflows/taxreport-loadtest-ondemand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,13 @@ jobs:
- 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
- name: Generate tokens
working-directory: ./performance-tests/tax-report/src
run: ./k6 run ../../generate-tokens/src/generate-tokens.js
run: ../../generate-tokens/src/generate-tokens.sh ../../generate-tokens/src ${{ inputs.limit }}
env:
env: ${{ secrets.YTENVIRONMENT }}
tokengenuser: ${{ secrets.TOKENGENUSER }}
tokengenuserpwd: ${{ secrets.TOKENGENPWD }}
limit: ${{ inputs.limit }}
API_ENVIRONMENT: ${{ secrets.YTENVIRONMENT }}
TOKEN_GENERATOR_USERNAME: ${{ secrets.TOKENGENUSER }}
TOKEN_GENERATOR_PASSWORD: ${{ secrets.TOKENGENPWD }}

- name: Setup K6
uses: grafana/setup-k6-action@v1
Expand Down
23 changes: 5 additions & 18 deletions .github/workflows/taxreport-loadtest-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,13 @@ jobs:
- 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
- name: Generate tokens
working-directory: ./performance-tests/tax-report/src
run: ./k6 run ../../generate-tokens/src/generate-tokens.js
run: ../../generate-tokens/src/generate-tokens.sh ../../generate-tokens/src 1
env:
env: ${{ secrets.YTENVIRONMENT }}
tokengenuser: ${{ secrets.TOKENGENUSER }}
tokengenuserpwd: ${{ secrets.TOKENGENPWD }}
limit: 1
API_ENVIRONMENT: ${{ secrets.YTENVIRONMENT }}
TOKEN_GENERATOR_USERNAME: ${{ secrets.TOKENGENUSER }}
TOKEN_GENERATOR_PASSWORD: ${{ secrets.TOKENGENPWD }}

- name: Setup K6
uses: grafana/setup-k6-action@v1
Expand Down
22 changes: 5 additions & 17 deletions .github/workflows/taxreport-loadtest-schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,13 @@ jobs:
- 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
- name: Generate tokens
working-directory: ./performance-tests/tax-report/src
run: ./k6 run ../../generate-tokens/src/generate-tokens.js
run: ../../generate-tokens/src/generate-tokens.sh ../../generate-tokens/src 0
env:
env: ${{ secrets.YTENVIRONMENT }}
tokengenuser: ${{ secrets.TOKENGENUSER }}
tokengenuserpwd: ${{ secrets.TOKENGENPWD }}
API_ENVIRONMENT: ${{ secrets.YTENVIRONMENT }}
TOKEN_GENERATOR_USERNAME: ${{ secrets.TOKENGENUSER }}
TOKEN_GENERATOR_PASSWORD: ${{ secrets.TOKENGENPWD }}

- name: Setup K6
uses: grafana/setup-k6-action@v1
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,9 @@ MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/

# .secrets
.secrets

# files with tokens
**/*tokens*.csv
Loading

0 comments on commit ec11314

Please sign in to comment.