Skip to content

Commit

Permalink
[AUTO-5283] Fix on demand test CI (#10883)
Browse files Browse the repository at this point in the history
* Fix on demand test CI

* Increase test timeout to 1h

* Increase parallel nodes for upgrade test

* Replace utils.GetEnv with os.GetEnv

* reduce nodes to 1 for node upgrade test

* increase nodes to 3 and increase runner size for node upgrade test

* throw error if upgrade envs not set

---------

Co-authored-by: anirudhwarrier <[email protected]>
  • Loading branch information
anirudhwarrier and anirudhwarrier authored Oct 10, 2023
1 parent e66a735 commit 5efd686
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/automation-ondemand-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ jobs:
command: -run ^TestAutomationReorg$ ./reorg
- name: upgrade
suite: smoke
nodes: 1
os: ubuntu-latest
nodes: 3
os: ubuntu20.04-8cores-32GB
pyroscope_env: ci-automation-on-demand-upgrade
network: SIMULATED
command: -run ^TestAutomationNodeUpgrade$ ./smoke
Expand All @@ -160,10 +160,12 @@ jobs:
echo "image=${{ env.CHAINLINK_IMAGE }}" >>$GITHUB_OUTPUT
echo "version=${{ github.sha }}" >>$GITHUB_OUTPUT
echo "upgrade_version=${{ github.sha }}" >>$GITHUB_OUTPUT
echo "upgrade_image=${{ env.CHAINLINK_IMAGE }}" >>$GITHUB_OUTPUT
else
echo "image=${{ inputs.chainlinkImage }}" >>$GITHUB_OUTPUT
echo "version=${{ inputs.chainlinkVersion }}" >>$GITHUB_OUTPUT
echo "upgrade_version=${{ inputs.chainlinkVersion }}" >>$GITHUB_OUTPUT
echo "upgrade_image=${{ inputs.chainlinkImage }}" >>$GITHUB_OUTPUT
fi
if [[ "${{ matrix.tests.name }}" == "upgrade" ]]; then
echo "image=${{ inputs.chainlinkImageUpdate }}" >>$GITHUB_OUTPUT
Expand All @@ -177,10 +179,10 @@ jobs:
PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }}
SELECTED_NETWORKS: ${{ matrix.tests.network }}
TEST_SUITE: ${{ matrix.tests.suite }}
TEST_UPGRADE_VERSION: ${{ steps.determine-build.outputs.upgrade_version }}
TEST_UPGRADE_IMAGE: ${{ env.CHAINLINK_IMAGE }}
UPGRADE_VERSION: ${{ steps.determine-build.outputs.upgrade_version }}
UPGRADE_IMAGE: ${{ steps.determine-build.outputs.upgrade_image }}
with:
test_command_to_run: make test_need_operator_assets && cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.tests.nodes }} ${{ matrix.tests.command }} 2>&1 | tee /tmp/gotest.log | gotestfmt
test_command_to_run: make test_need_operator_assets && cd ./integration-tests && go test -timeout 60m -count=1 -json -test.parallel=${{ matrix.tests.nodes }} ${{ matrix.tests.command }} 2>&1 | tee /tmp/gotest.log | gotestfmt
test_download_vendor_packages_command: cd ./integration-tests && go mod download
cl_repo: ${{ steps.determine-build.outputs.image }}
cl_image_tag: ${{ steps.determine-build.outputs.version }}
Expand Down
10 changes: 5 additions & 5 deletions integration-tests/smoke/automation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"github.com/smartcontractkit/chainlink-testing-framework/blockchain"
"github.com/smartcontractkit/chainlink-testing-framework/logging"
"github.com/smartcontractkit/chainlink-testing-framework/networks"
"github.com/smartcontractkit/chainlink-testing-framework/utils"

"github.com/smartcontractkit/chainlink/integration-tests/actions"
"github.com/smartcontractkit/chainlink/integration-tests/client"
Expand Down Expand Up @@ -105,10 +104,11 @@ func SetupAutomationBasic(t *testing.T, nodeUpgrade bool) {
testName = "basic-upkeep"
)
if nodeUpgrade {
upgradeImage, err = utils.GetEnv("UPGRADE_IMAGE")
require.NoError(t, err, "Error getting upgrade image")
upgradeVersion, err = utils.GetEnv("UPGRADE_VERSION")
require.NoError(t, err, "Error getting upgrade version")
upgradeImage = os.Getenv("UPGRADE_IMAGE")
upgradeVersion = os.Getenv("UPGRADE_VERSION")
if len(upgradeImage) == 0 || len(upgradeVersion) == 0 {
t.Fatal("UPGRADE_IMAGE and UPGRADE_VERSION must be set to upgrade nodes")
}
testName = "node-upgrade"
}
chainClient, _, contractDeployer, linkToken, registry, registrar, testEnv := setupAutomationTestDocker(
Expand Down

0 comments on commit 5efd686

Please sign in to comment.