Skip to content

Commit

Permalink
rpc tests on demand
Browse files Browse the repository at this point in the history
  • Loading branch information
LesnyRumcajs committed Apr 19, 2024
1 parent c02a97d commit 03bd5d5
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 34 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/composite/rpc_test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: RPC tests composite action

description: |
This action runs the RPC conformance tests
inputs:
FIL_PROOFS_PARAMETER_CACHE:
required: true
SHELL_IMAGE:
required: true

runs:
using: "composite"
steps:
- uses: actions/cache@v4
id: cache
with:
path: '${{ inputs.FIL_PROOFS_PARAMETER_CACHE }}'
key: proof-params-keys
- name: Load cache into volume
if: steps.cache.outputs.cache-hit == 'true'
run: |
docker volume create api_compare_filecoin-proofs
docker run --rm \
-v api_compare_filecoin-proofs:/proofs \
-v ${{ inputs.FIL_PROOFS_PARAMETER_CACHE }}:/cache \
${{ inputs.SHELL_IMAGE }} \
sh -c "cp /cache/* /proofs"
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: 'forest-${{ runner.os }}'
- name: Run api compare tests
run: ./scripts/tests/api_compare/setup.sh
timeout-minutes: 30
env:
# We use a custom Dockerfile for CI to speed up the build process.
FOREST_DOCKERFILE_OVERRIDE: scripts/devnet/forest_ci.dockerfile
- name: Dump docker logs
if: always()
uses: jwalton/gh-docker-logs@v2
- name: Prepare cache folder for uploading
if: steps.cache.outputs.cache-hit != 'true'
run: |
docker run --rm \
-v api_compare_filecoin-proofs:/proofs \
-v ${{ inputs.FIL_PROOFS_PARAMETER_CACHE }}:/cache \
${{ inputs.SHELL_IMAGE }} \
sh -c "cp /proofs/* /cache"
sudo chmod -R 755 ${{ inputs.FIL_PROOFS_PARAMETER_CACHE }}
37 changes: 3 additions & 34 deletions .github/workflows/forest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -372,40 +372,9 @@ jobs:
- build-ubuntu
name: Calibnet RPC checks
runs-on: ubuntu-latest
env:
# We use a custom Dockerfile for CI to speed up the build process.
FOREST_DOCKERFILE_OVERRIDE: scripts/devnet/forest_ci.dockerfile
steps:
- uses: actions/cache@v4
id: cache
with:
path: '${{ env.FIL_PROOFS_PARAMETER_CACHE }}'
key: proof-params-keys
- name: Load cache into volume
if: steps.cache.outputs.cache-hit == 'true'
run: |
docker volume create api_compare_filecoin-proofs
docker run --rm \
-v api_compare_filecoin-proofs:/proofs \
-v $FIL_PROOFS_PARAMETER_CACHE:/cache \
$SHELL_IMAGE \
sh -c "cp /cache/* /proofs"
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- uses: ./.github/workflows/composite/rpc_test
with:
name: 'forest-${{ runner.os }}'
- name: Run api compare tests
run: ./scripts/tests/api_compare/setup.sh
timeout-minutes: '${{ fromJSON(env.SCRIPT_TIMEOUT_MINUTES) }}'
- name: Dump docker logs
if: always()
uses: jwalton/gh-docker-logs@v2
- name: Prepare cache folder for uploading
if: steps.cache.outputs.cache-hit != 'true'
run: |
docker run --rm \
-v api_compare_filecoin-proofs:/proofs \
-v $FIL_PROOFS_PARAMETER_CACHE:/cache \
$SHELL_IMAGE \
sh -c "cp /proofs/* /cache"
sudo chmod -R 755 $FIL_PROOFS_PARAMETER_CACHE
FIL_PROOFS_PARAMETER_CACHE: ${{ env.FIL_PROOFS_PARAMETER_CACHE }}
SHELL_IMAGE: ${{ env.SHELL_IMAGE }}

0 comments on commit 03bd5d5

Please sign in to comment.