Update CI for using testnet-onboarding laconic2d (#8)

* Update CI for using testnet-onboarding laconic2d

* Run onboarding test in CI
This commit is contained in:
Nabarun Gogoi 2024-07-05 18:38:46 +05:30 committed by GitHub
parent f51b31b954
commit a871d0c035
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 27 additions and 3 deletions

View File

@ -15,9 +15,10 @@ jobs:
uses: actions/checkout@v3
with:
path: "./laconicd/"
repository: cerc-io/laconicd
repository: deep-stack/laconic2d
token: ${{ secrets.GH_PAT }} # PAT for accessing private laconic2d
fetch-depth: 0
ref: main
ref: testnet-onboarding
- name: Environment
run: ls -tlh && env
@ -51,3 +52,12 @@ jobs:
- name: Run nameservice expiry tests
working-directory: laconicd/tests/sdk_tests
run: ./run-tests.sh test:nameservice-expiry
- name: Start containers (onboarding enabled)
working-directory: laconicd/tests/sdk_tests
env:
ONBOARDING_ENABLED: true
run: docker compose up -d
- name: Run nameservice expiry tests
working-directory: laconicd/tests/sdk_tests
run: ./run-tests.sh test:onboarding

View File

@ -64,6 +64,7 @@
"test": "jest --runInBand --verbose --testPathPattern=src",
"test:auctions": "TEST_AUCTIONS_ENABLED=1 jest --runInBand --verbose src/auction.test.ts",
"test:nameservice-expiry": "TEST_NAMESERVICE_EXPIRY=1 jest --runInBand --verbose src/nameservice-expiry.test.ts",
"test:onboarding": "ONBOARDING_ENABLED=1 jest --runInBand --verbose src/onboarding.test.ts",
"build": "tsc",
"lint": "eslint .",
"prepare": "husky"

View File

@ -53,4 +53,17 @@ const onboardingTests = () => {
});
};
describe('Onboarding', onboardingTests);
if (!process.env.ONBOARDING_ENABLED) {
// Required as jest complains if file has no tests.
test('skipping onboarding tests', () => {});
} else {
/**
In laconic2d repo run:
TEST_REGISTRY_EXPIRY=true ./init.sh
Run tests:
yarn test:onboarding
*/
describe('Onboarding', onboardingTests);
}