Skip to content

Commit

Permalink
testing bump e2e test deps
Browse files Browse the repository at this point in the history
  • Loading branch information
aalu1418 committed Feb 9, 2024
1 parent 111b7c0 commit c4df9bd
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 1 deletion.
103 changes: 103 additions & 0 deletions .github/workflows/dependency-updates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: DependencyUpdater
on: push
# workflow_dispatch:
# schedule:
# - cron: '0 0 * * *' # check every day at midnight UTC

jobs:
# E2E-Solana-Image:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3 # checkout branch that it is called from
# - name: Check for solana image updates
# id: solImage
# run: |
# make upgrade-e2e-solana-image
# image=$(curl https://api.github.com/repos/solana-labs/solana/releases/latest | jq -r '.tag_name')
# echo "image=$image" >> "$GITHUB_OUTPUT"
# - name: Check if PR exists
# id: check
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# prs=$(gh pr list \
# --repo "$GITHUB_REPOSITORY" \
# --head "bump/solana-${{ steps.solImage.outputs.image }}" \
# --json title \
# --jq 'length')
# if ((prs > 0)); then
# echo "skip=true" >> "$GITHUB_OUTPUT"
# fi
# - name: Create pull request
# if: '!steps.check.outputs.skip'
# uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v6.0.0
# with:
# title: "[automated] bump solana image to ${{ steps.solImage.outputs.image }}"
# branch: bump/solana-${{ steps.solImage.outputs.image }}
# author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
# reviewers: aalu1418
# commit-message: "[automated] bump solana dependencies"
# body: "Latest Solana mainnet release is [\"${{ steps.solImage.outputs.image }}\"](https://github.com/solana-labs/solana/releases/latest)"
E2E-Testing-Dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version-file: "go.mod"
check-latest: true
cache: true
# ------ Get CTF version from core ------------
- uses: actions/checkout@v3
with:
repository: smartcontractkit/chainlink
ref: develop
path: ./chainlink
- name: Check CTF version in core
id: coreCTF
working-directory: ./chainlink
run: |

Check failure on line 60 in .github/workflows/dependency-updates.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/dependency-updates.yml#L60

shellcheck reported issue in this script: SC2086:info:3:6: Double quote to prevent globbing and word splitting [shellcheck]
Raw output
.github/workflows/dependency-updates.yml:60:9: shellcheck reported issue in this script: SC2086:info:3:6: Double quote to prevent globbing and word splitting [shellcheck]
cd integration-tests
version=$(go list -m github.com/smartcontractkit/chainlink-testing-framework | awk '{print $NF}')
echo $version
echo "version=$version" >> "$GITHUB_OUTPUT"
cd ../../
rm -rf chainlink
# -------- Compare to chainlink-solana/integration-tests --------------
- name: Check CTF version in chainlink-solana
id: solanaCTF
run: |

Check failure on line 70 in .github/workflows/dependency-updates.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/dependency-updates.yml#L70

shellcheck reported issue in this script: SC2086:info:3:6: Double quote to prevent globbing and word splitting [shellcheck]
Raw output
.github/workflows/dependency-updates.yml:70:9: shellcheck reported issue in this script: SC2086:info:3:6: Double quote to prevent globbing and word splitting [shellcheck]
cd integration-tests
version=$(go list -m github.com/smartcontractkit/chainlink-testing-framework | awk '{print $NF}')
echo $version
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Update integration test dependencies
if: ${{ steps.coreCTF.outputs.version != steps.solanaCTF.outputs.version }}
run: |
make upgrade-e2e-core-deps
make gomodtidy
# --------- Build PR if necessary --------------------
- name: Check if PR exists
id: check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
prs=$(gh pr list \
--repo "$GITHUB_REPOSITORY" \
--head "bump/e2e-test-deps-${{ steps.coreCTF.outputs.version }}" \
--json title \
--jq 'length')
if ((prs > 0)); then
echo "skip=true" >> "$GITHUB_OUTPUT"
fi
- name: Create pull request
if: '!steps.check.outputs.skip'
uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v6.0.0
with:
title: "[automated] bump e2e test deps to match chainlink/integration-tests"
branch: bump/e2e-test-deps-${{ steps.coreCTF.outputs.version }}
author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
reviewers: aalu1418
commit-message: "[automated] bump e2e <> core/integration-tests dependencies"
body: "chainlink/integration-tests uses chainlink-testing-framework@${{ steps.coreCTF.outputs.version }}"
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,8 @@ lint-go-integration-tests:

.PHONY: lint-go-relay
lint-go-relay:
cd ./pkg && golangci-lint --color=always --exclude=dot-imports --timeout 10m --out-format checkstyle:golangci-lint-relay-report.xml run || true
cd ./pkg && golangci-lint --color=always --exclude=dot-imports --timeout 10m --out-format checkstyle:golangci-lint-relay-report.xml run || true

.PHONY: update-e2e-core-deps
upgrade-e2e-core-deps:
cd ./integration-tests && ../scripts/update-e2e.sh
10 changes: 10 additions & 0 deletions scripts/update-e2e.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -e

# get current develop branch sha
SHA=$(curl https://api.github.com/repos/smartcontractkit/chainlink/commits/develop | jq -r '.sha')
echo "Chainlink Develop Commit: $SHA"

# update dependencies
go get github.com/smartcontractkit/chainlink/integration-tests@$SHA
go get github.com/smartcontractkit/chainlink/v2@$SHA

0 comments on commit c4df9bd

Please sign in to comment.