Skip to content

Commit

Permalink
add forge setup step
Browse files Browse the repository at this point in the history
  • Loading branch information
oldGreg5 committed Oct 17, 2024
1 parent 16baf16 commit b50d43c
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ jobs:
allure:
needs: ci
uses: input-output-hk/catalyst-voices/.github/workflows/generate-allure-report.yml@974-task-make-the-allure-report-workflow-run-after-the-normal-ci-run
with:
forge_version: 0.2.1
62 changes: 50 additions & 12 deletions .github/workflows/generate-allure-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ on:
branches: "main"
tags: ["*"]
workflow_call:
inputs:
forge_version:
description: |
The version of the forge CLI to install (use 'local' for testing)
type: string
required: false
default: latest
secrets:
earthly_token:
description: Optional Earthly token used to login to Earthly cloud during local builds of Forge CLI
required: false

permissions:
contents: write
Expand Down Expand Up @@ -33,55 +44,82 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install Forge
uses: input-output-hk/catalyst-forge/actions/install@ci/v1.1.0
if: ${{ inputs.forge_version != 'local' }}
with:
version: ${{ inputs.forge_version }}

- name: Install Local Forge
uses: input-output-hk/catalyst-forge/actions/install-local@ci/v1.1.0
if: ${{ inputs.forge_version == 'local' }}
with:
earthly_token: ${{ secrets.earthly_token }}

- name: Check forge version
id: local
run: |
forge version
if [[ "${{ inputs.forge_version }}" == "local" ]]; then
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "skip=false" >> $GITHUB_OUTPUT
fi
- name: Setup CI
uses: input-output-hk/catalyst-ci/actions/setup@master
uses: input-output-hk/catalyst-forge/actions/setup@ci/v1.1.0
with:
aws_role_arn: ${{ env.AWS_ROLE_ARN }}
aws_region: ${{ env.AWS_REGION }}
earthly_runner_secret: ${{ secrets.EARTHLY_RUNNER_SECRET }}
skip_docker: 'true'
skip_github: 'true'
skip_earthly: ${{ steps.local.outputs.skip }}

- name: Get catalyst gateway unit test report
uses: input-output-hk/catalyst-ci/actions/run@master
uses: input-output-hk/catalyst-forge/.github/workflows/run.yml@ci/v1.1.0
if: always()
continue-on-error: true
with:
earthfile: ./catalyst-gateway/
earthfiles: ./catalyst-gateway/
forge_version: 0.2.1
flags:
targets: build
target_flags:
runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }}
artifact: "false"

- name: Get schemathesis test report
uses: input-output-hk/catalyst-ci/actions/run@master
uses: input-output-hk/catalyst-forge/.github/workflows/run.yml@ci/v1.1.0
if: always()
continue-on-error: true
with:
earthfile: ./catalyst-gateway/tests/schemathesis_tests
earthfiles: ./catalyst-gateway/tests/schemathesis_tests
forge_version: 0.2.1
flags: --allow-privileged
targets: test-fuzzer-api
target_flags:
runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }}
artifact: "false"

- name: Get flutter unit test report
uses: input-output-hk/catalyst-ci/actions/run@master
uses: input-output-hk/catalyst-forge/.github/workflows/run.yml@ci/v1.1.0
if: always()
continue-on-error: true
with:
earthfile: ./catalyst_voices/
earthfiles: ./catalyst_voices/
forge_version: 0.2.1
flags:
targets: test-unit
target_flags:
runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }}
artifact: "false"

- name: Get python api test report
uses: input-output-hk/catalyst-ci/actions/run@master
uses: input-output-hk/catalyst-forge/.github/workflows/run.yml@ci/v1.1.0
if: always()
continue-on-error: true
with:
earthfile: ./catalyst-gateway/tests/api_tests/
earthfiles: ./catalyst-gateway/tests/api_tests/
forge_version: 0.2.1
flags: --allow-privileged
targets: test
target_flags:
Expand Down

0 comments on commit b50d43c

Please sign in to comment.