Skip to content

Commit

Permalink
Merge pull request #255 from smartcontractkit/develop
Browse files Browse the repository at this point in the history
Release contracts v1.0 (#2)
  • Loading branch information
archseer authored Apr 20, 2022
2 parents 43f3aa5 + aab4229 commit b2dde6d
Show file tree
Hide file tree
Showing 158 changed files with 4,584 additions and 1,465 deletions.
51 changes: 28 additions & 23 deletions .github/workflows/chaos.yml
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 * * *'
Expand All @@ -11,8 +11,8 @@ on:
type: string

jobs:
build_custom_cl_image:
name: Build custom CL image
e2e_chaos_build_custom_chainlink_image:
name: E2E Chaos 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:
Expand All @@ -27,10 +27,11 @@ jobs:
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }}
build:
e2e_chaos_build_contracts:
name: E2E Chaos Build Contracts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@f25a3a9f25bd5f4c5d77189cab02ff357b5aedeb # v2.4.1
- name: Cache cargo registry
uses: actions/[email protected]
with:
Expand All @@ -42,24 +43,29 @@ jobs:
path: ~/.cargo/git
key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Build Artifacts
run: |
make contracts_compile
- uses: actions/upload-artifact@master
run: make contracts_compile
- name: Upload Artifacts
uses: actions/upload-artifact@master
with:
name: artifacts
path: artifacts
chaos:
e2e_run_chaos_tests:
name: E2E Run Chaos Tests
runs-on: ubuntu-latest
needs: [build, build_custom_cl_image]
needs: [e2e_chaos_build_contracts, e2e_chaos_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
uses: actions/checkout@f25a3a9f25bd5f4c5d77189cab02ff357b5aedeb # v2.4.1
- name: Install Nix
uses: cachix/install-nix-action@v14
with:
go-version: 1.17.2
install_url: https://nixos-nix-install-tests.cachix.org/serve/vij683ly7sl95nnhb67bdjjfabclr85m/install
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
extra_nix_config: |
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand All @@ -85,14 +91,11 @@ jobs:
${{ runner.os }}-go-
- name: Download Go Vendor Packages
if: steps.cache-packages.outputs.cache-hit != 'true'
run: go mod download
run: nix develop -c make download
- name: Install Ginkgo CLI
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
run: nix develop -c make install
- name: Download Artifacts
uses: actions/download-artifact@master
with:
name: artifacts
path: artifacts
Expand All @@ -103,8 +106,10 @@ jobs:
CHAINLINK_IMAGE: 795953128386.dkr.ecr.us-west-2.amazonaws.com/chainlink
CHAINLINK_VERSION: custom.${{ github.sha }}
run: |
export PATH=$PATH:$(go env GOPATH)/bin
ginkgo tests/e2e/chaos
PATH=$PATH:$(go env GOPATH)/bin
export PATH
cp -r artifacts packages-ts/gauntlet-terra-contracts/artifacts/bin
nix develop -c make test_chaos
- name: Publish Test Results
uses: mikepenz/action-junit-report@v2
if: always()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up (force) Go 1.17
uses: actions/checkout@f25a3a9f25bd5f4c5d77189cab02ff357b5aedeb # v2.4.1
- name: Set up (force) Go 1.18
uses: actions/setup-go@v1
with:
go-version: 1.17.x
go-version: 1.18
id: go

# Initializes the CodeQL tools for scanning.
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/contracts-release.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: Release Artifacts
name: release_contracts
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching v*, i.e. v1.0-rc1, v20.15.10-rc5

jobs:
release-artifacts:
release_contracts:
name: Release Contracts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@f25a3a9f25bd5f4c5d77189cab02ff357b5aedeb # v2.4.1
- name: Build Artifacts
run: |
make contracts_compile
run: make contracts_compile
- name: Create Release
uses: softprops/action-gh-release@v1
with:
Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@ on:
push:
branches:
- develop
- main
pull_request:

name: Contracts
name: contracts

jobs:

test:
name: Test Suite
contracts_unit_tests:
name: Contract Unit Testing
runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: ./contracts
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@f25a3a9f25bd5f4c5d77189cab02ff357b5aedeb # v2.4.1

- name: Install Nix
uses: cachix/install-nix-action@v14
Expand All @@ -42,15 +40,12 @@ jobs:
env:
RUSTFLAGS: "-C link-arg=-s"

lints:
name: Lints
contracts_lint:
name: Contracts Lint
runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: ./contracts
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@f25a3a9f25bd5f4c5d77189cab02ff357b5aedeb # v2.4.1

- name: Install Nix
uses: cachix/install-nix-action@v14
Expand Down
44 changes: 26 additions & 18 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,50 @@
name: e2e_tests
name: e2e_smoke_tests
on:
workflow_call:
inputs:
repo_name:
required: true
description: The name of the github repository
default: ${{ github.repository }}
type: string
ref:
required: true
description: The git ref to use
default: ${{ github.sha }}
type: string
cl_repo:
required: true
description: The chainlik ecr repository to use
default: public.ecr.aws/z0b1w9r9/chainlink
type: string
cl_image:
required: true
description: The chainlink image to use
default: develop
type: string
secrets:
QA_AWS_ACCESS_KEY_ID:
required: true
description: The AWS access key id to use
QA_AWS_SECRET_KEY:
required: true
description: The AWS secret key to use
QA_AWS_REGION:
required: true
description: The AWS region to use
QA_AWS_ROLE_TO_ASSUME:
required: true
description: The AWS role to assume
QA_KUBECONFIG:
required: true
NPM_TOKEN:
required: true
description: The kubernetes configuation to use

jobs:
build:
e2e_build_contracts:
name: E2E Build Contracts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@f25a3a9f25bd5f4c5d77189cab02ff357b5aedeb # v2.4.1
with:
repository: ${{ inputs.repo_name }}
ref: ${{ inputs.ref }}
Expand All @@ -52,18 +61,20 @@ jobs:
- name: Build Artifacts
run: |
make contracts_compile
- uses: actions/upload-artifact@master
- name: Upload Artifacts
uses: actions/upload-artifact@master
with:
name: artifacts
path: artifacts
smoke:
e2e_run_smoke_tests:
name: E2E Run Smoke Tests
runs-on: ubuntu-latest
needs: build
needs: e2e_build_contracts
env:
CGO_ENABLED: 1
steps:
- name: Checkout the repo
uses: actions/checkout@v2
uses: actions/checkout@f25a3a9f25bd5f4c5d77189cab02ff357b5aedeb # v2.4.1
with:
repository: ${{ inputs.repo_name }}
ref: ${{ inputs.ref }}
Expand Down Expand Up @@ -102,25 +113,22 @@ jobs:
if: steps.cache-packages.outputs.cache-hit != 'true'
run: nix develop -c make download
- name: Install Ginkgo CLI
run: |
nix develop -c make install
- uses: actions/download-artifact@master
run: nix develop -c make install
- name: Download Artifacts
uses: actions/download-artifact@master
with:
name: artifacts
path: artifacts
- name: Generate gauntlet executable
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm config set -- '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
nix develop -c make build_js
run: nix develop -c make build_js
- name: Run Tests
env:
SELECTED_NETWORKS: localterra
CHAINLINK_IMAGE: ${{ inputs.cl_repo }}
CHAINLINK_VERSION: ${{ inputs.cl_image }}
run: |
export PATH=$PATH:$(go env GOPATH)/bin
PATH=$PATH:$(go env GOPATH)/bin
export PATH
cp -r artifacts packages-ts/gauntlet-terra-contracts/artifacts/bin
nix develop -c make test_smoke
- name: Publish Test Results
Expand Down
46 changes: 20 additions & 26 deletions .github/workflows/e2e_custom_cl.yml
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:
Expand All @@ -8,14 +8,13 @@ on:
required: true
default: develop
type: string

jobs:
build:
e2e_custom_build_artifacts:
name: E2E Custom Build Artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
repository: ${{ inputs.repo_name }}
ref: ${{ inputs.ref }}
- uses: actions/checkout@f25a3a9f25bd5f4c5d77189cab02ff357b5aedeb # v2.4.1
- name: Cache cargo registry
uses: actions/[email protected]
with:
Expand All @@ -27,14 +26,14 @@ jobs:
path: ~/.cargo/git
key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Build Artifacts
run: |
make contracts_compile
- uses: actions/upload-artifact@master
run: make contracts_compile
- name: Upload Artifacts
uses: actions/upload-artifact@master
with:
name: artifacts
path: artifacts
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:
Expand All @@ -49,17 +48,15 @@ jobs:
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }}
smoke:
e2e_cutsom_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]
env:
CGO_ENABLED: 1
steps:
- name: Checkout the repo
uses: actions/checkout@v2
with:
repository: ${{ inputs.repo_name }}
ref: ${{ inputs.ref }}
uses: actions/checkout@f25a3a9f25bd5f4c5d77189cab02ff357b5aedeb # v2.4.1
- name: Install Nix
uses: cachix/install-nix-action@v14
with:
Expand Down Expand Up @@ -95,25 +92,22 @@ jobs:
if: steps.cache-packages.outputs.cache-hit != 'true'
run: nix develop -c make download
- name: Install Ginkgo CLI
run: |
nix develop -c make install
- uses: actions/download-artifact@master
run: nix develop -c make install
- name: Download Artifacts
uses: actions/download-artifact@master
with:
name: artifacts
path: artifacts
- name: Generate gauntlet executable
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm config set -- '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
nix develop -c make build_js
run: nix develop -c make build_js
- name: Run Tests
env:
SELECTED_NETWORKS: localterra
CHAINLINK_IMAGE: 795953128386.dkr.ecr.us-west-2.amazonaws.com/chainlink
CHAINLINK_VERSION: custom.${{ github.sha }}
run: |
export PATH=$PATH:$(go env GOPATH)/bin
PATH=$PATH:$(go env GOPATH)/bin
export PATH
cp -r artifacts packages-ts/gauntlet-terra-contracts/artifacts/bin
nix develop -c make test_smoke
- name: Publish Test Results
Expand Down
Loading

0 comments on commit b2dde6d

Please sign in to comment.