Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading