-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the initial version of the action and a worfklow to validate it
- There are some work in progress to tackle, since we need to have an example of how to use the action created. This is ongoing.
- Loading branch information
Showing
3 changed files
with
96 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: 'Rootstock Integration Tests Action' | ||
description: 'This action provides a containerized environment for running integration tests on Rootstock.' | ||
author: 'Rootstock Labs' | ||
|
||
inputs: | ||
rskj-branch: | ||
description: 'The rskj branch to checkout' | ||
required: false | ||
default: 'master' | ||
federator-branch: | ||
description: 'The federate-node branch to checkout' | ||
required: false | ||
default: 'master' | ||
rit-branch: | ||
description: 'The rootstock-integration-tests branch to checkout' | ||
required: false | ||
default: 'main' | ||
rit-log-level: | ||
description: 'Log level for the rootstock-integration-tests' | ||
required: false | ||
default: 'info' | ||
|
||
outputs: | ||
status: | ||
description: 'The status of the integration tests' | ||
message: | ||
description: 'The output message of the integration tests' | ||
|
||
runs: | ||
using: docker | ||
image: ./images/Dockerfile | ||
env: | ||
RSKJ_BRANCH: ${{ inputs.rskj-branch }} | ||
FEDERATOR_BRANCH: ${{ inputs.federator-branch }} | ||
RIT_BRANCH: ${{ inputs.rit-branch }} | ||
RIT_LOG_LEVEL: ${{ inputs.rit-log-level }} |
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Continuous Integration Tests | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test-rit-docker: | ||
name: Test Rootstock Integration Tests docker image | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
registry: | ||
image: registry:2 | ||
ports: | ||
- 5001:5000 | ||
|
||
env: | ||
TEST_TAG: localhost:5001/actions/container-action:latest | ||
|
||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Docker BuildX | ||
id: setup-buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
install: true | ||
driver-opts: network=host | ||
platforms: linux/amd64,linux/arm64 | ||
|
||
|
||
- name: Build the RIT Container | ||
id: build | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: .github/images | ||
push: true | ||
tags: ${{ env.TEST_TAG }} | ||
|
||
- name: Run the RIT Container | ||
id: run | ||
env: | ||
RSKJ_BRANCH: 'master' | ||
FEDERATOR_BRANCH: 'master' | ||
run: | | ||
docker run \ | ||
--env RSKJ_BRANCH="${{ env.RSKJ_BRANCH }}" \ | ||
--env FEDERATOR_BRANCH="${{ env.FEDERATOR_BRANCH }}" \ | ||
--rm ${{ env.TEST_TAG }} |