Skip to content

added a test for the getEstimatedFeesForNextPegoutEvent #1167

added a test for the getEstimatedFeesForNextPegoutEvent

added a test for the getEstimatedFeesForNextPegoutEvent #1167

Workflow file for this run

name: RIT Action Continuous Integration Test
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
inputs:
rskj-branch:
description: 'Branch for RSKj'
required: false
default: 'master'
powpeg-branch:
description: 'Branch for PowPeg Node'
required: false
default: 'master'
permissions:
contents: read
env:
TEST_TAG: ${{ github.event.repository.name }}/rit:test
LATEST_TAG: ghcr.io/rsksmart/${{ github.event.repository.name }}/rit
jobs:
build-push-rit-action-container-action:
name: Test RIT Action docker container-action
runs-on: ubuntu-latest
timeout-minutes: 45
permissions:
packages: write
steps:
- name: Checkout
id: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Docker meta
id: meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: |
${{ env.LATEST_TAG }}
${{ env.TEST_TAG }}
- name: Setup Docker BuildX
id: setup-buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
with:
install: true
driver-opts: network=host
platforms: linux/amd64
- name: Build and export locally Docker
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
with:
context: container-action/
load: true
tags: ${{ env.TEST_TAG }}
# Call the composite action to set branch variables
- name: Set Branch Variables
uses: ./.github/actions/set-branch-variables
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Test the RIT Container Action
id: test-container
env:
INPUT_RSKJ_BRANCH: ${{ env.RSKJ_BRANCH }}
INPUT_POWPEG_NODE_BRANCH: ${{ env.POWPEG_BRANCH }}
INPUT_RIT_BRANCH: ${{ env.RIT_BRANCH }}
INPUT_RIT_LOG_LEVEL: info
run: |
docker run \
--env GITHUB_OUTPUT="/github-output" \
--env INPUT_RSKJ_BRANCH="${{ env.RSKJ_BRANCH }}" \
--env INPUT_POWPEG_NODE_BRANCH="${{ env.POWPEG_BRANCH }}" \
--env INPUT_RIT_BRANCH="${{ env.RIT_BRANCH }}" \
--env INPUT_RIT_LOG_LEVEL="${{ env.INPUT_RIT_LOG_LEVEL }}" \
-v "$GITHUB_OUTPUT:/github-output" \
--rm ${{ env.TEST_TAG }}
- name: GitHub container registry login
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the RIT Action Container Image
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
with:
context: container-action/
tags: ${{ env.LATEST_TAG }}
labels: ${{ steps.meta.outputs.labels }}
load: true
push: true
test-rit-action:
if: ${{ github.ref == 'refs/heads/main' }}
needs: build-push-rit-action-container-action
name: GitHub Actions Test
runs-on: ubuntu-latest
timeout-minutes: 150
steps:
- name: Checkout
id: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# Call the composite action here to set branch variables
- name: Set Branch Variables
uses: ./.github/actions/set-branch-variables
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Test RIT Action
id: test-rit-action
uses: ./
with:
rskj-branch: ${{ env.RSKJ_BRANCH }}
powpeg-node-branch: ${{ env.POWPEG_BRANCH }}
rit-branch: ${{ env.RIT_BRANCH }}
- name: Print RIT Status and Message
id: output
run: |
echo "RIT Status = ${{ steps.test-rit-action.outputs.status }}"
echo "RIT Message = ${{ steps.test-rit-action.outputs.message }}"