-
Notifications
You must be signed in to change notification settings - Fork 19
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
Fix ci #356
Fix ci #356
Changes from 27 commits
b462015
e9e6271
2b6cd76
a2c8790
c14eb9f
af3bcaf
3206fcd
3875478
b09ca75
70d8fe1
c0a8b95
25def08
d350489
cc1246a
fae5cfa
e849e64
0a52985
e612f67
eefe189
2fb4e96
fb7fa08
b78003c
7ea334d
491bcdd
03c4528
7c3458f
57cedea
c1ca385
f34bd9d
86db013
b1fc757
61ce4f5
aa0e2b7
53da150
ef06dc9
2f97df7
a6fd9e3
c8179ff
a780d1a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -125,7 +125,9 @@ jobs: | |||||
TEST_DURATION: 15m | ||||||
NODE_COUNT: 5 | ||||||
CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink | ||||||
CHAINLINK_VERSION: starknet.${{ github.sha }}${{ matrix.image.tag-suffix }} | ||||||
CHAINLINK_VERSION: starknet.${{ github.sha }} | ||||||
INTERNAL_DOCKER_REPO: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com | ||||||
scarb_version: "v2.5.4" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 to using the install-cairo action, then we don't need |
||||||
permissions: | ||||||
checks: write | ||||||
pull-requests: write | ||||||
|
@@ -147,9 +149,39 @@ jobs: | |||||
uses: cachix/install-nix-action@29bd9290ef037a3ecbdafe83cbd2185e9dd0fa0a # v20 | ||||||
with: | ||||||
nix_path: nixpkgs=channel:nixos-unstable | ||||||
- name: Setup Scarb for Linux | ||||||
id: install-scarb | ||||||
shell: bash | ||||||
run: | | ||||||
wget https://github.com/software-mansion/scarb/releases/download/${{ env.scarb_version }}/scarb-${{ env.scarb_version }}-x86_64-unknown-linux-musl.tar.gz | ||||||
tar -xvzf scarb-${{ env.scarb_version }}-x86_64-unknown-linux-musl.tar.gz | ||||||
mv -vf scarb-${{ env.scarb_version }}-x86_64-unknown-linux-musl scarb-build | ||||||
echo "$GITHUB_WORKSPACE/scarb-build/bin" >> $GITHUB_PATH | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not just use the action we use on all the other workflows chainlink-starknet/.github/workflows/contracts.yml Lines 41 to 42 in 57cedea
|
||||||
- name: Build contracts | ||||||
run: | | ||||||
cd contracts && scarb --profile release build | ||||||
- name: Generate config overrides | ||||||
run: | # https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/config/README.md | ||||||
cat << EOF > config.toml | ||||||
[ChainlinkImage] | ||||||
image="${{ env.CHAINLINK_IMAGE }}" | ||||||
version="${{ env.CHAINLINK_VERSION }}" | ||||||
[Network] | ||||||
selected_networks=["SIMULATED"] | ||||||
[Common] | ||||||
internal_docker_repo = "${{ env.INTERNAL_DOCKER_REPO }}" | ||||||
stateful_db = false | ||||||
EOF | ||||||
# shellcheck disable=SC2002 | ||||||
BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0) | ||||||
# shellcheck disable=SC2086 | ||||||
echo ::add-mask::$BASE64_CONFIG_OVERRIDE | ||||||
# shellcheck disable=SC2086 | ||||||
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV | ||||||
- name: Run Tests ${{ matrix.image.name }} | ||||||
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@ea889b3133bd7f16ab19ba4ba130de5d9162c669 # v2.3.4 | ||||||
with: | ||||||
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} | ||||||
test_command_to_run: nix develop -c helm repo update && make test-integration-smoke-ci | ||||||
test_download_vendor_packages_command: cd integration-tests && nix develop -c go mod download | ||||||
cl_repo: ${{ env.CL_ECR }} | ||||||
|
@@ -159,4 +191,4 @@ jobs: | |||||
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} | ||||||
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | ||||||
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} | ||||||
artifacts_location: /home/runner/work/chainlink-starknet/chainlink-starknet/integration-tests/smoke/logs | ||||||
artifacts_location: /home/runner/work/chainlink-starknet/chainlink-starknet/integration-tests/smoke/logs |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,3 +166,4 @@ ztarrepo.tar.gz | |
eslint-report.json | ||
.run.id | ||
.local-mock-server | ||
overrides.toml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
scarb 2.5.4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's already a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both removed |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what does this file do? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is related to the testconfig and TOML changes, that is how the logic knows where to look for the toml configurations. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,28 @@ | ||
# Local e2e testing | ||
## Integration tests - HOWTO | ||
|
||
Make sure to have `psql` installed locally. We use it to create a new database for each node. | ||
### Prerequisites | ||
1. `cd contracts && scarb --profile release build` | ||
2. `yarn install` | ||
3. `yarn build` | ||
|
||
Create a new network for containers (only needs to be done once). A custom network allows containers to DNS resolve each other using container names. | ||
#### TOML preparation | ||
The integration tests are using TOML as the configuration input. The logic and parsing is located under [Test config](./testconfig) | ||
|
||
``` | ||
docker network create chainlink | ||
``` | ||
By default, the tests will be running with the default config set in [default.toml](./testconfig/default.toml). This configuration is set to run on devnet with local docker. | ||
|
||
Build a custom core image with starknet relayer bumped to some commit. | ||
Fields in the default toml can be overriden by creating an `overrides.toml`file. Any values specified here take precedence and will be overwritten if they overlap with `default.toml`. | ||
|
||
``` | ||
cd ../core | ||
go get github.com/smartcontractkit/chainlink-starknet/relayer@<MY COMMIT HERE> | ||
docker build . -t smartcontract/chainlink:starknet -f ./core/chainlink.Dockerfile | ||
``` | ||
##### Testnet runs | ||
In order to run the tests on Testnet, additional variables need to be specified in the TOML, these would also be pointed out if `network = "testnet"` is set. The additional variables are: | ||
|
||
Compile contracts and gauntlet: | ||
- `l2_rpc_url` - L2 RPC url | ||
- `account` - Account address on L2 | ||
- `private_key` - Private key for L2 account | ||
|
||
``` | ||
yarn build | ||
cd contracts | ||
scarb --profile release build | ||
``` | ||
##### Running in k8s | ||
|
||
Run the tests! | ||
Set `inside_k8 = true` under `[Common]`. | ||
|
||
``` | ||
cd integration-tests | ||
go test -count 1 -v -timeout 30m --run OCRBasic ./smoke | ||
``` | ||
#### Run tests | ||
|
||
Use `something.down.sh` scripts to teardown everything afterwards if the tests don't properly clean up. | ||
|
||
# Old docs | ||
|
||
For more information, see the [Chainlink Starknet Documentation | Integration Tests](../docs/integration-tests). | ||
`cd integration-tests && go test --timeout=2h -v -count=1 -json ./smoke` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the matrix suffix not necessary now? the push_tag on L69 still push with a
matrix.image.tag-suffix
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we need to maintain both if we want to run long running soak tests, if we only use docker there is no reliable way to run our tests for a longer period of time.