Skip to content

Commit

Permalink
ci(bug): Update permissions in JSON rpc relay for GITHUB_TOKEN (#3183) (
Browse files Browse the repository at this point in the history
#3186)

* ci(bug): Update permissions in JSON rpc relay for GITHUB_TOKEN (#3183)

**Description**:
Added `packages: write` permission per
https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-with-a-personal-access-token-classic
May need to modify other files modified by #3124

**Related Issue(s)**:
Relates to #3124
Relates to #3182

Signed-off-by: Roger Barker <[email protected]>

* chore: divided hbar limtier tests into different batches (#3181)

* chore: divided hbar limtier tests into different batches

Signed-off-by: Logan Nguyen <[email protected]>

* fix: fixed acceptance.yml

Signed-off-by: Logan Nguyen <[email protected]>

---------

Signed-off-by: Logan Nguyen <[email protected]>

---------

Signed-off-by: Roger Barker <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Co-authored-by: Roger Barker <[email protected]>
Co-authored-by: Logan Nguyen <[email protected]>
  • Loading branch information
3 people authored Oct 31, 2024
1 parent 024a7c5 commit 61b34b0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,17 @@ jobs:
testfilter: ratelimiter
test_ws_server: true

hbarlimiter:
name: HBar Limiter
hbarlimiter_batch_1:
name: HBar Limiter Batch 1
uses: ./.github/workflows/acceptance-workflow.yml
with:
testfilter: hbarlimiter
testfilter: hbarlimiter_batch1

hbarlimiter_batch_2:
name: HBar Limiter Batch 2
uses: ./.github/workflows/acceptance-workflow.yml
with:
testfilter: hbarlimiter_batch2

tokencreate:
name: Token Create
Expand Down Expand Up @@ -115,7 +121,8 @@ jobs:
- api_batch_3
- erc20
- ratelimiter
- hbarlimiter
- hbarlimiter_batch_1
- hbarlimiter_batch_2
- tokencreate
- tokenmanagement
- htsprecompilev1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:

permissions:
contents: read
packages: write

jobs:
docker-image-publish:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"acceptancetest:api_batch3": "nyc ts-mocha packages/server/tests/acceptance/index.spec.ts -g '@api-batch-3' --exit",
"acceptancetest:erc20": "nyc ts-mocha packages/server/tests/acceptance/index.spec.ts -g '@erc20' --exit",
"acceptancetest:ratelimiter": "nyc ts-mocha packages/ws-server/tests/acceptance/index.spec.ts -g '@web-socket-ratelimiter' --exit && ts-mocha packages/server/tests/acceptance/index.spec.ts -g '@ratelimiter' --exit",
"acceptancetest:hbarlimiter": "HBAR_RATE_LIMIT_TINYBAR=5000000000 HBAR_RATE_LIMIT_BASIC=1000000000 HBAR_RATE_LIMIT_EXTENDED=1500000000 HBAR_RATE_LIMIT_PRIVILEGED=2000000000 nyc ts-mocha packages/server/tests/acceptance/index.spec.ts -g '@hbarlimiter' --exit",
"acceptancetest:hbarlimiter_batch1": "HBAR_RATE_LIMIT_BASIC=1000000000 HBAR_RATE_LIMIT_EXTENDED=1500000000 HBAR_RATE_LIMIT_PRIVILEGED=2000000000 nyc ts-mocha packages/server/tests/acceptance/index.spec.ts -g '@hbarlimiter-batch1' --exit",
"acceptancetest:hbarlimiter_batch2": "HBAR_RATE_LIMIT_BASIC=1000000000 HBAR_RATE_LIMIT_EXTENDED=1500000000 HBAR_RATE_LIMIT_PRIVILEGED=2000000000 nyc ts-mocha packages/server/tests/acceptance/index.spec.ts -g '@hbarlimiter-batch2' --exit",
"acceptancetest:tokencreate": "nyc ts-mocha packages/server/tests/acceptance/index.spec.ts -g '@tokencreate' --exit",
"acceptancetest:tokenmanagement": "nyc ts-mocha packages/server/tests/acceptance/index.spec.ts -g '@tokenmanagement' --exit",
"acceptancetest:htsprecompilev1": "nyc ts-mocha packages/server/tests/acceptance/index.spec.ts -g '@htsprecompilev1' --exit",
Expand Down
6 changes: 3 additions & 3 deletions packages/server/tests/acceptance/hbarLimiter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ describe('@hbarlimiter HBAR Limiter Acceptance Tests', function () {
}
});

describe('Total HBAR Limit', () => {
describe('@hbarlimiter-batch1 Total HBAR Limit', () => {
it('should execute "eth_sendRawTransaction" without triggering HBAR rate limit exceeded', async function () {
const parentContract = await deployContract(parentContractJson, accounts[0].wallet);

Expand Down Expand Up @@ -366,7 +366,7 @@ describe('@hbarlimiter HBAR Limiter Acceptance Tests', function () {
});

describe('HBAR Rate Limit For Different Spending Plan Tiers', () => {
describe('BASIC Tier', () => {
describe('@hbarlimiter-batch1 BASIC Tier', () => {
it('should create a BASIC spending plan for a new user and use the same plan on second transaction and different plan on third transaction from another user', async function () {
const parentContract = await deployContract(parentContractJson, accounts[0].wallet);
// awaiting for HBAR limiter to finish updating expenses in the background
Expand Down Expand Up @@ -506,7 +506,7 @@ describe('@hbarlimiter HBAR Limiter Acceptance Tests', function () {
});
});

describe('Preconfigured Tiers', () => {
describe('@hbarlimiter-batch2 Preconfigured Tiers', () => {
const createAliasForNonBasicPlans = async (subscriptionTier: SubscriptionTier) => {
const aliasAccount = await Utils.createAliasAccount(
mirrorNode,
Expand Down

0 comments on commit 61b34b0

Please sign in to comment.