Skip to content

Commit

Permalink
Add Explicit Names For CI (#241)
Browse files Browse the repository at this point in the history
* Update names for ci jobs
* update naming to be lowercase snakecase
fix go lint to not be ignored for required checks
* cleanup npm token
* Clean up chaos github action to use nix and add golint to asdf and make
* bump versions
  • Loading branch information
tateexon authored Apr 5, 2022
1 parent e9e9e19 commit 280dde0
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 113 deletions.
44 changes: 24 additions & 20 deletions .github/workflows/chaos.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: E2E Chaos Tests
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,7 +27,8 @@ 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
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
- name: Install Nix
uses: cachix/install-nix-action@v14
with:
go-version: 1.18
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 @@ -104,7 +107,8 @@ jobs:
CHAINLINK_VERSION: custom.${{ github.sha }}
run: |
export PATH=$PATH:$(go env GOPATH)/bin
ginkgo tests/e2e/chaos
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
5 changes: 3 additions & 2 deletions .github/workflows/contracts-release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
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
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@ 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
Expand All @@ -42,12 +40,9 @@ 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
Expand Down
28 changes: 13 additions & 15 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: E2E External tests flow
name: e2e_smoke_tests
on:
workflow_call:
inputs:
Expand Down Expand Up @@ -29,10 +29,10 @@ on:
required: true
QA_KUBECONFIG:
required: true
NPM_TOKEN:
required: true

jobs:
build:
e2e_build_contracts:
name: E2E Build Contracts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -52,13 +52,15 @@ 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:
Expand Down Expand Up @@ -102,18 +104,14 @@ 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
Expand Down
33 changes: 16 additions & 17 deletions .github/workflows/e2e_custom_cl.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: E2E Tests
name: e2e_tests_custom_cl
on:
push:
workflow_dispatch:
Expand All @@ -8,8 +8,10 @@ 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
Expand All @@ -27,14 +29,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,9 +51,10 @@ 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:
Expand Down Expand Up @@ -95,18 +98,14 @@ 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
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/e2e_soak.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: E2E Soak test
name: e2e_soak_tests
on:
schedule:
- cron: '0 */3 * * *'
Expand All @@ -9,8 +9,10 @@ on:
required: true
default: develop
type: string

jobs:
build:
e2e_soak_test_build:
name: E2E Soak Test Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -30,12 +32,13 @@ 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
build_custom_cl_image:
name: Build custom CL image
e2e_soak_test_build_custom_chainlink_image:
name: Build Soak Test 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 @@ -50,9 +53,10 @@ jobs:
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }}
soak:
e2e_run_soak_tests:
name: E2E Run Soak Tests
runs-on: ubuntu-latest
needs: [build, build_custom_cl_image]
needs: [e2e_soak_test_build, e2e_soak_test_build_custom_chainlink_image]
env:
CGO_ENABLED: 1
steps:
Expand Down Expand Up @@ -98,7 +102,8 @@ jobs:
- name: Install Ginkgo CLI
run: |
nix develop -c make install
- uses: actions/download-artifact@master
- name: Download Artifacts
uses: actions/download-artifact@master
with:
name: artifacts
path: artifacts
Expand Down
Loading

0 comments on commit 280dde0

Please sign in to comment.