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:
parent
f51b31b954
commit
a871d0c035
14
.github/workflows/test.yml
vendored
14
.github/workflows/test.yml
vendored
@ -15,9 +15,10 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
path: "./laconicd/"
|
path: "./laconicd/"
|
||||||
repository: cerc-io/laconicd
|
repository: deep-stack/laconic2d
|
||||||
|
token: ${{ secrets.GH_PAT }} # PAT for accessing private laconic2d
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: main
|
ref: testnet-onboarding
|
||||||
- name: Environment
|
- name: Environment
|
||||||
run: ls -tlh && env
|
run: ls -tlh && env
|
||||||
|
|
||||||
@ -51,3 +52,12 @@ jobs:
|
|||||||
- name: Run nameservice expiry tests
|
- name: Run nameservice expiry tests
|
||||||
working-directory: laconicd/tests/sdk_tests
|
working-directory: laconicd/tests/sdk_tests
|
||||||
run: ./run-tests.sh test:nameservice-expiry
|
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
|
||||||
|
@ -64,6 +64,7 @@
|
|||||||
"test": "jest --runInBand --verbose --testPathPattern=src",
|
"test": "jest --runInBand --verbose --testPathPattern=src",
|
||||||
"test:auctions": "TEST_AUCTIONS_ENABLED=1 jest --runInBand --verbose src/auction.test.ts",
|
"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: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",
|
"build": "tsc",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"prepare": "husky"
|
"prepare": "husky"
|
||||||
|
@ -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);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user