-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bundle
test-commons
and host versions as assets in project releases
- Loading branch information
Showing
14 changed files
with
377 additions
and
11 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,43 @@ | ||
name: Release test-commons | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
checks: | ||
runs-on: ubuntu-latest | ||
# if: startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- name: Check out source code | ||
uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18.x' | ||
- name: Install dependencies | ||
run: | | ||
set -x | ||
cd test-commons | ||
npm install | ||
- name: Build & archive | ||
run: | | ||
set -x | ||
cd test-commons | ||
rm -rf dist/* | ||
VERSION="${GITHUB_REF##*/}" | ||
npm run rollup | ||
- name: Create release with assets | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
set -x | ||
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y) | ||
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ | ||
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \ | ||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ | ||
&& sudo apt update \ | ||
&& sudo apt install gh -y | ||
cd test-commons | ||
gh release create "${VERSION}" ./dist/* --title "${VERSION}" --target "${GITHUB_SHA}" --generate-notes |
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
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,2 @@ | ||
node_modules | ||
.DS_Store |
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,19 @@ | ||
const WorkloadConfig = { | ||
average: [ | ||
{ duration: '1m', target: 100 }, | ||
{ duration: '4m', target: 100 }, | ||
{ duration: '1m', target: 0 }, | ||
], | ||
stress: [ | ||
{ duration: '1m', target: 700 }, | ||
{ duration: '4m', target: 700 }, | ||
{ duration: '1m', target: 0 }, | ||
], | ||
smoke: [{ duration: '10s', target: 1 }], | ||
}; | ||
|
||
function sayHello() { | ||
return 'Hello'; | ||
} | ||
|
||
export { WorkloadConfig, sayHello }; |
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,2 @@ | ||
export { WorkloadConfig } from './src/config/workload'; | ||
export { sayHello } from './src/utils/say-hello'; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,4 +1,14 @@ | ||
{ | ||
"name": "test-commons", | ||
"version": "1.0.0" | ||
"version": "1.0.0", | ||
"type": "module", | ||
"engines": { | ||
"node": ">=18 <19" | ||
}, | ||
"devDependencies": { | ||
"rollup": "^4.9.5" | ||
}, | ||
"scripts": { | ||
"rollup": "rollup --config" | ||
} | ||
} |
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,9 @@ | ||
|
||
export default { | ||
input: 'index.js', | ||
output: { | ||
dir: 'dist', | ||
format: 'es', | ||
}, | ||
external: [new RegExp(/^(k6|https?\:\/\/)(\/.*)?/)], | ||
}; |
File renamed without changes.
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,3 @@ | ||
export function sayHello() { | ||
return 'Hello'; | ||
} |
Oops, something went wrong.