Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- add ci for triggering tests #63

Merged
merged 3 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
58 changes: 58 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: CI

on:
pull_request:
branches:
- dev
- master
- 'feature/**'
- 'release/**'
- 'hotfix/**'
types:
- opened
- synchronize
- edited

env:
PROFILE: release

jobs:
build:
runs-on: ubuntu-latest
concurrency: dev
steps:
- uses: actions/checkout@v3

- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Configure AWS credentials ORG
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.ORG_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.ORG_AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2

- name: Login to Amazon ECR ORG
id: login-ecr-org
uses: aws-actions/amazon-ecr-login@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push docker image to ECR Docker
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile.tests
push: false
build-args: |
"ECR_REGISTRY=${{ steps.login-ecr-org.outputs.registry }}"
90 changes: 0 additions & 90 deletions .github/workflows/ci.yml

This file was deleted.

49 changes: 36 additions & 13 deletions .github/workflows/dev.yml → .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,41 @@ jobs:
"SCCACHE_BUCKET=cere-blockchain-sccache"

tags: |
${{ steps.login-ecr.outputs.registry }}/pos-network-node:${{ github.sha }}
${{ steps.login-ecr.outputs.registry }}/pos-network-node:dev-${{ github.sha }}
${{ steps.login-ecr.outputs.registry }}/pos-network-node:${{ env.GITHUB_SHA }}
${{ steps.login-ecr.outputs.registry }}/pos-network-node:dev-latest

# - name: Upload cere-runtime wasm artifact
# uses: actions/upload-artifact@v3
# with:
# name: cere_runtime.compact.compressed.${{ env.GITHUB_SHA }}.wasm
# path: target/${{ vars.PROFILE }}/wbuild/cere-runtime/cere_runtime.compact.compressed.wasm
#
# - name: Upload cere-dev-runtime wasm artifact
# uses: actions/upload-artifact@v3
# with:
# name: cere_dev_runtime.compact.compressed.${{ env.GITHUB_SHA }}.wasm
# path: target/${{ vars.PROFILE }}/wbuild/cere-dev-runtime/cere_dev_runtime.compact.compressed.wasm
# - name: Upload cere-runtime wasm artifact
# uses: actions/upload-artifact@v3
# with:
# name: cere_runtime.compact.compressed.${{ env.GITHUB_SHA }}.wasm
# path: target/${{ vars.PROFILE }}/wbuild/cere-runtime/cere_runtime.compact.compressed.wasm
#
# - name: Upload cere-dev-runtime wasm artifact
# uses: actions/upload-artifact@v3
# with:
# name: cere_dev_runtime.compact.compressed.${{ env.GITHUB_SHA }}.wasm
# path: target/${{ vars.PROFILE }}/wbuild/cere-dev-runtime/cere_dev_runtime.compact.compressed.wasm

trigger-e2e-tests:
runs-on: ubuntu-latest
needs: build
steps:
- name: 'Trigger e2e DDC tests'
uses: convictional/[email protected]
with:
owner: Cerebellum-Network
repo: ddc-api-e2e-simulations
github_token: ${{ secrets.GH_E2E_TOKEN }}
comment_github_token: ${{ secrets.GH_E2E_TOKEN }}
github_user: devops-cere
workflow_file_name: run-basic-ddc-tests.yml
client_payload: |-
{
"POS_NODE_VERSION": "${{ env.GITHUB_SHA }}"
}
ref: master
wait_interval: 30
propagate_failure: true
trigger_workflow: true
wait_workflow: true
comment_downstream_url: ${{ github.event.pull_request.comments_url }}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
"SCCACHE_BUCKET=cere-blockchain-sccache"

tags: |
${{ steps.login-ecr.outputs.registry }}/pos-network-node:${{ github.sha }}
${{ steps.login-ecr.outputs.registry }}/pos-network-node:${{ env.GITHUB_SHA }}

# - name: Upload cere-runtime wasm artifact
# uses: actions/upload-artifact@v3
Expand Down
Loading