-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
asdf and ginkgo updates to bring more in line with terra (#256)
* Brings things more in sync with terra. I could not figure out how to get the gauntlet.yml, and the e2e yml github action jobs to run nix without have an hour startup for the first command on every run. Tried using caches and such in different ways to no avail. It does just seem to work for the relay.yml so I left that using nix. I did fix up the gauntlet and e2e ymls so all we need to do is drop in the nix install and prepend the nix develop call so it should be an easy update once we get nix issues figured out. I left us at go 1.17.x for now even though 1.18 is out since we probably don't want to add that extra complexity to testing this close to release * Update ci job names to be more explicit for what they are doing * for now run on every commit to it can be made a required check * updates from comments and make script to go from tool-versions to env * copy paste error * looks like the importer makes everything lower case * move to setup go v2 * pr comment fixes * merge conflict fixes * remove nix from relay in ci
- Loading branch information
Showing
18 changed files
with
322 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: chaos | ||
name: e2e_chaos_tests | ||
on: | ||
schedule: | ||
- cron: '0 */3 * * *' | ||
|
@@ -11,31 +11,31 @@ on: | |
type: string | ||
|
||
jobs: | ||
build: | ||
chaos_testing_build_contracts: | ||
name: Chaos Testing Build Contracts | ||
runs-on: ubuntu-latest | ||
container: | ||
image: projectserum/build:v0.22.1 | ||
env: | ||
RUSTUP_HOME: "/root/.rustup" | ||
FORCE_COLOR: 1 | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: echo $HOME | ||
- run: echo $PATH | ||
- run: | | ||
npm config set -- '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" | ||
NPM_TOKEN=${NPM_TOKEN} yarn install --frozen-lockfile | ||
- run: yarn install --frozen-lockfile | ||
- name: Generate program_ids | ||
run: ./scripts/programs-keys-gen.sh | ||
- run: anchor build | ||
- name: Build Contracts | ||
run: anchor build | ||
working-directory: contracts | ||
- uses: actions/upload-artifact@master | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: target | ||
path: contracts/target/deploy | ||
build_custom_cl_image: | ||
name: Build custom CL image | ||
chaos_testing_build_custom_chainlink_image: | ||
name: Chaos Testing Build Custom Chainlink Image | ||
# target branch can't be set as var, it's from where we getting pipeline code | ||
uses: smartcontractkit/chainlink/.github/workflows/build-custom.yml@develop | ||
with: | ||
|
@@ -50,18 +50,24 @@ jobs: | |
AWS_REGION: ${{ secrets.QA_AWS_REGION }} | ||
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | ||
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} | ||
chaos: | ||
chaos_testing_run_test: | ||
name: Chaos Testing Run Test | ||
runs-on: ubuntu-latest | ||
needs: [build, build_custom_cl_image] | ||
needs: [chaos_testing_build_contracts, chaos_testing_build_custom_chainlink_image] | ||
env: | ||
CGO_ENABLED: 1 | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v2 | ||
- name: Setup go | ||
uses: actions/setup-go@v1 | ||
- name: .tool-versions to .env | ||
run: ./scripts/tool-versions-to-env.sh | ||
- name: dotenv | ||
uses: falti/[email protected] | ||
id: dotenv | ||
- name: Setup go ${{ steps.dotenv.outputs.golang_version }} | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
go-version: ${{ steps.dotenv.outputs.golang_version }} | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
|
@@ -94,7 +100,8 @@ jobs: | |
go get github.com/onsi/ginkgo/v2/ginkgo/[email protected] | ||
go get github.com/onsi/ginkgo/v2/ginkgo/[email protected] | ||
go install github.com/onsi/ginkgo/v2/ginkgo | ||
- uses: actions/download-artifact@master | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@master | ||
with: | ||
name: target | ||
path: contracts/target/deploy | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: e2e_workflow_call | ||
name: e2e_smoke_tests | ||
on: | ||
workflow_call: | ||
inputs: | ||
|
@@ -31,44 +31,49 @@ on: | |
required: true | ||
|
||
jobs: | ||
build: | ||
e2e_build_contracts: | ||
name: E2E Build Contracts | ||
runs-on: ubuntu-latest | ||
container: | ||
image: projectserum/build:v0.22.1 | ||
env: | ||
RUSTUP_HOME: "/root/.rustup" | ||
FORCE_COLOR: 1 | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ inputs.repo_name }} | ||
- run: echo $HOME | ||
- run: echo $PATH | ||
- run: | | ||
npm config set -- '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" | ||
NPM_TOKEN=${NPM_TOKEN} yarn install --frozen-lockfile | ||
- run: yarn install --frozen-lockfile | ||
- name: Generate program_ids | ||
run: ./scripts/programs-keys-gen.sh | ||
- run: anchor build | ||
working-directory: contracts | ||
- uses: actions/upload-artifact@master | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: target | ||
path: contracts/target/deploy | ||
smoke: | ||
e2e_run_smoke_tests: | ||
name: E2E Run Smoke Tests | ||
runs-on: ubuntu-latest | ||
needs: build | ||
needs: e2e_build_contracts | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ inputs.repo_name }} | ||
ref: ${{ inputs.ref }} | ||
- name: Setup go | ||
uses: actions/setup-go@v1 | ||
- name: .tool-versions to .env | ||
run: ./scripts/tool-versions-to-env.sh | ||
- name: dotenv | ||
uses: falti/[email protected] | ||
id: dotenv | ||
- name: Setup go ${{ steps.dotenv.outputs.golang_version }} | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
go-version: ${{ steps.dotenv.outputs.golang_version }} | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
|
@@ -89,19 +94,22 @@ jobs: | |
path: | | ||
~/.cache/go-build | ||
~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
~/go/bin | ||
key: ${{ runner.os }}-go2-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
${{ runner.os }}-go2- | ||
- name: Download Go Vendor Packages | ||
if: steps.cache-packages.outputs.cache-hit != 'true' | ||
run: go mod download | ||
run: make download | ||
- name: Install Ginkgo CLI | ||
if: steps.cache-packages.outputs.cache-hit != 'true' | ||
run: | | ||
make install | ||
- name: Check for ginkgo ls | ||
run: | | ||
go get github.com/onsi/ginkgo/v2/ginkgo/[email protected] | ||
go get github.com/onsi/ginkgo/v2/ginkgo/[email protected] | ||
go get github.com/onsi/ginkgo/v2/ginkgo/[email protected] | ||
go install github.com/onsi/ginkgo/v2/ginkgo | ||
- uses: actions/download-artifact@master | ||
ls ~/go/bin/ | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@master | ||
with: | ||
name: target | ||
path: contracts/target/deploy | ||
|
@@ -117,7 +125,7 @@ jobs: | |
CGO_ENABLED: 1 | ||
run: | | ||
export PATH=$PATH:$(go env GOPATH)/bin | ||
ginkgo tests/e2e/smoke | ||
make test_smoke | ||
- name: Publish Test Results | ||
uses: mikepenz/action-junit-report@v2 | ||
if: always() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: e2e_tests_custom_cl_image | ||
name: e2e_tests_custom_cl | ||
on: | ||
push: | ||
workflow_dispatch: | ||
|
@@ -9,33 +9,33 @@ on: | |
default: develop | ||
type: string | ||
jobs: | ||
build: | ||
|
||
e2e_custom_build_artifacts: | ||
name: E2E Custom Build Artifacts | ||
runs-on: ubuntu-latest | ||
container: | ||
image: projectserum/build:v0.22.1 | ||
env: | ||
RUSTUP_HOME: "/root/.rustup" | ||
FORCE_COLOR: 1 | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ inputs.repo_name }} | ||
- run: echo $HOME | ||
- run: echo $PATH | ||
- run: | | ||
npm config set -- '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" | ||
NPM_TOKEN=${NPM_TOKEN} yarn install --frozen-lockfile | ||
- run: yarn install --frozen-lockfile | ||
- name: Generate program_ids | ||
run: ./scripts/programs-keys-gen.sh | ||
- run: anchor build | ||
working-directory: contracts | ||
- uses: actions/upload-artifact@master | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: target | ||
path: contracts/target/deploy | ||
build_custom_cl_image: | ||
name: Build custom CL image | ||
e2e_custom_build_custom_chainlink_image: | ||
name: E2E Custom Build Custom CL Image | ||
# target branch can't be set as var, it's from where we getting pipeline code | ||
uses: smartcontractkit/chainlink/.github/workflows/build-custom.yml@develop | ||
with: | ||
|
@@ -50,18 +50,22 @@ jobs: | |
AWS_REGION: ${{ secrets.QA_AWS_REGION }} | ||
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | ||
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} | ||
smoke: | ||
e2e_custom_run_smoke_tests: | ||
name: E2E Custom Run Smoke Tests | ||
runs-on: ubuntu-latest | ||
needs: [build, build_custom_cl_image] | ||
needs: [e2e_custom_build_artifacts, e2e_custom_build_custom_chainlink_image] | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v2 | ||
- name: go version | ||
run: go version | ||
- name: Setup go | ||
uses: actions/setup-go@v1 | ||
- name: .tool-versions to .env | ||
run: ./scripts/tool-versions-to-env.sh | ||
- name: dotenv | ||
uses: falti/[email protected] | ||
id: dotenv | ||
- name: Setup go ${{ steps.dotenv.outputs.golang_version }} | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17.2 | ||
go-version: ${{ steps.dotenv.outputs.golang_version }} | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
|
@@ -82,19 +86,22 @@ jobs: | |
path: | | ||
~/.cache/go-build | ||
~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
~/go/bin | ||
key: ${{ runner.os }}-go2-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
${{ runner.os }}-go2- | ||
- name: Download Go Vendor Packages | ||
if: steps.cache-packages.outputs.cache-hit != 'true' | ||
run: go mod download | ||
run: make download | ||
- name: Install Ginkgo CLI | ||
if: steps.cache-packages.outputs.cache-hit != 'true' | ||
run: | | ||
make install | ||
- name: Check for ginkgo ls | ||
run: | | ||
go get github.com/onsi/ginkgo/v2/ginkgo/[email protected] | ||
go get github.com/onsi/ginkgo/v2/ginkgo/[email protected] | ||
go get github.com/onsi/ginkgo/v2/ginkgo/[email protected] | ||
go install github.com/onsi/ginkgo/v2/ginkgo | ||
- uses: actions/download-artifact@master | ||
ls ~/go/bin/ | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@master | ||
with: | ||
name: target | ||
path: contracts/target/deploy | ||
|
@@ -108,7 +115,7 @@ jobs: | |
CGO_ENABLED: 1 | ||
run: | | ||
export PATH=$PATH:$(go env GOPATH)/bin | ||
ginkgo tests/e2e/smoke | ||
make test_smoke | ||
- name: Publish Test Results | ||
uses: mikepenz/action-junit-report@v2 | ||
if: always() | ||
|
Oops, something went wrong.