-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
23 additions
and
102 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
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 |
---|---|---|
|
@@ -53,7 +53,6 @@ jobs: | |
include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}} | ||
|
||
steps: | ||
|
||
- name: Clean Workspace | ||
uses: AutoModality/[email protected] | ||
|
||
|
@@ -69,25 +68,6 @@ jobs: | |
- name: Read .env file | ||
uses: xom9ikk/[email protected] | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.CORE_DOCKERHUB_TOKEN }} | ||
|
||
# Build main image for TRY-RUNTIME | ||
- name: Generate ENV related extend Dockerfile file | ||
uses: cuchi/[email protected] | ||
with: | ||
template: .docker/Dockerfile-try-runtime.j2 | ||
output_file: .docker/Dockerfile-try-runtime.${{ matrix.network }}.yml | ||
variables: | | ||
NETWORK=${{ matrix.network }} | ||
REPLICA_FROM=${{ matrix.replica_from_address }} | ||
- name: Show build Dockerfile | ||
run: cat .docker/Dockerfile-try-runtime.${{ matrix.network }}.yml | ||
|
||
- name: Run find-and-replace to remove slashes from branch name | ||
uses: mad9000/actions-find-and-replace-string@5 | ||
id: branchname | ||
|
@@ -101,90 +81,30 @@ jobs: | |
run: | | ||
echo "BUILD_SHA=${LAST_COMMIT_SHA:0:8}" >> $GITHUB_ENV | ||
- name: Build the stack | ||
run: cd .docker/ && docker build --no-cache --file ./Dockerfile-try-runtime.${{ matrix.network }}.yml --tag uniquenetwork/ci-tryruntime-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA ../ | ||
|
||
- name: Push docker image version | ||
run: docker push uniquenetwork/ci-tryruntime-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA | ||
|
||
- name: Remove builder cache | ||
if: always() # run this step always | ||
run: | | ||
docker builder prune -f | ||
docker system prune -f | ||
try-runtime-tests: | ||
needs: [prepare-execution-marix, try-runtime-build] | ||
# The type of runner that the job will run on | ||
runs-on: [medium] | ||
|
||
timeout-minutes: 600 | ||
|
||
name: ${{ matrix.network }}-try-runtime-tests | ||
|
||
continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false. | ||
|
||
strategy: | ||
matrix: | ||
include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}} | ||
|
||
steps: | ||
- name: Skip if pull request is in Draft | ||
if: github.event.pull_request.draft == true | ||
run: exit 1 | ||
|
||
- name: Clean Workspace | ||
uses: AutoModality/[email protected] | ||
|
||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/[email protected] | ||
with: | ||
ref: ${{ github.head_ref }} #Checking out head commit | ||
|
||
- name: Prepare | ||
uses: ./.github/actions/prepare | ||
|
||
- name: Set build SHA | ||
shell: bash | ||
run: | | ||
echo "BUILD_SHA=${LAST_COMMIT_SHA:0:8}" >> $GITHUB_ENV | ||
- name: Run find-and-replace to remove slashes from branch name | ||
uses: mad9000/actions-find-and-replace-string@5 | ||
id: branchname | ||
- name: Prepare container | ||
uses: ./.github/actions/buildContainer | ||
id: try-runtime | ||
with: | ||
source: ${{ github.head_ref }} | ||
find: '/' | ||
replace: '-' | ||
|
||
- name: Read .env file | ||
uses: xom9ikk/[email protected] | ||
container: uniquenetwork/ci-tryruntime-local | ||
tag: ${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA | ||
context: .docker | ||
dockerfile: Dockerfile-try-runtime | ||
args: | | ||
--build-arg NETWORK=${{ matrix.network }} | ||
--build-arg REPLICA_FROM=${{ matrix.replica_from_address }} | ||
dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} | ||
dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }} | ||
|
||
- name: Generate ENV related extend file for docker-compose | ||
uses: cuchi/[email protected] | ||
with: | ||
template: .docker/docker-compose.try-runtime.j2 | ||
output_file: .docker/docker-compose.try-runtime.${{ matrix.network }}.yml | ||
output_file: .docker/docker-compose.try-runtime.yml | ||
variables: | | ||
NETWORK=${{ matrix.network }} | ||
BUILD_TAG=${{ steps.branchname.outputs.value }}-$BUILD_SHA | ||
- name: Show build configuration | ||
run: cat .docker/docker-compose.try-runtime.${{ matrix.network }}.yml | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
node-version: 20 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.CORE_DOCKERHUB_TOKEN }} | ||
BUILD_TAG=${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA | ||
- name: Build the stack | ||
run: docker compose -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" up -d --remove-orphans --force-recreate --timeout 300 | ||
- name: RUN the stack | ||
run: docker compose -f ".docker/docker-compose.try-runtime.yml" up -d --remove-orphans --force-recreate --timeout 300 | ||
|
||
- name: Check if docker logs consist logs related to Runtime Upgrade testing. | ||
if: success() | ||
|