forked from 0xPolygon/polygon-edge
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add apex ci * APEX-184 Create Blade github action for apex-bridge and fw changes ----------------------------------------------------- Co-authored-by: milos-ethernal <[email protected]> Co-authored-by: Zoltan Babinski <[email protected]> * Add apex ci * test folder * Add apex ci * CI fixes * Yaml and failing test fixes * remove some comment * file name * Resolve comments --------- Co-authored-by: Igor Crevar <[email protected]> Co-authored-by: Zoltan Babinski <[email protected]>
- Loading branch information
1 parent
66d84d2
commit fe9fd74
Showing
11 changed files
with
461 additions
and
345 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,92 @@ | ||
--- | ||
name: ApexBridge CI | ||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- feature/apex-bridge | ||
pull_request: | ||
branches: | ||
- feature/apex-bridge | ||
workflow_dispatch: | ||
inputs: | ||
build_blade: | ||
description: Build Blade | ||
type: boolean | ||
default: true | ||
lint: | ||
description: Lint | ||
type: boolean | ||
default: true | ||
# unit_test: | ||
# description: Unit Tests | ||
# type: boolean | ||
# default: true | ||
e2e_apex_tests: | ||
description: E2E ApexBridge Tests | ||
type: boolean | ||
default: true | ||
workflow_call: | ||
inputs: | ||
build_blade: | ||
description: Build Blade | ||
type: boolean | ||
lint: | ||
description: Lint | ||
type: boolean | ||
required: true | ||
# unit_test: | ||
# description: Unit Tests | ||
# type: boolean | ||
# required: true | ||
e2e_apex_tests: | ||
description: E2E ApexBridge Tests | ||
type: boolean | ||
default: true | ||
outputs: | ||
build_blade: | ||
description: Build Blade output | ||
value: ${{ jobs.build_blade.outputs.workflow_output }} | ||
lint: | ||
description: Lint output | ||
value: ${{ jobs.lint.outputs.workflow_output }} | ||
unit_test: | ||
description: Unit Tests output | ||
value: ${{ jobs.unit_test.outputs.workflow_output }} | ||
e2e_apex_tests: | ||
description: E2E ApexBridge Tests output | ||
value: ${{ jobs.e2e_apex_tests.outputs.workflow_output }} | ||
|
||
jobs: | ||
build_blade: | ||
name: Build Blade | ||
uses: ./.github/workflows/build.yml | ||
if: | | ||
inputs.build_blade || | ||
github.event_name == 'pull_request' || | ||
(github.event_name == 'push' && github.ref == 'refs/heads/feature/apex-bridge') | ||
lint: | ||
name: Lint | ||
uses: ./.github/workflows/lint.yml | ||
needs: build_blade | ||
if: | | ||
inputs.lint || | ||
github.event_name == 'pull_request' || | ||
(github.event_name == 'push' && github.ref == 'refs/heads/feature/apex-bridge') | ||
# unit_test: | ||
# name: Unit Tests | ||
# uses: ./.github/workflows/unit-test.yml | ||
# needs: build_blade | ||
# if: | | ||
# inputs.unit_test || | ||
# github.event_name == 'pull_request' || | ||
# (github.event_name == 'push' && github.ref == 'refs/heads/feature/apex-bridge') | ||
e2e_apex_test: | ||
name: E2E ApexBridge Tests | ||
uses: ./.github/workflows/e2e-apex-test.yml | ||
needs: build_blade | ||
if: | | ||
inputs.e2e_polybft_test || | ||
github.event_name == 'pull_request' || | ||
(github.event_name == 'push' && github.ref == 'refs/heads/feature/apex-bridge') | ||
secrets: | ||
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} |
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,75 @@ | ||
--- | ||
name: E2E ApexBridge Tests | ||
on: # yamllint disable-line rule:truthy | ||
workflow_call: | ||
outputs: | ||
workflow_output: | ||
description: E2E ApexBridge Tests output | ||
value: ${{ jobs.e2e_apex_bridge.outputs.e2e_apex_output_failure }} | ||
secrets: | ||
PERSONAL_ACCESS_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
e2e_apex_bridge: | ||
name: Run E2E ApexBridge Tests | ||
runs-on: ubuntu-latest | ||
env: | ||
E2E_TESTS: true | ||
E2E_LOGS: true | ||
CI_VERBOSE: true | ||
outputs: | ||
e2e_apex_output_failure: ${{ steps.run_e2e_apex_failure.outputs.test_output }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
- name: Install Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.21.x | ||
check-latest: true | ||
- name: Generate OpenSSL certificate | ||
run: openssl req -x509 -out localhost.crt -keyout localhost.key -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' -extensions EXT -config <(printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth") | ||
- name: Copy certificate key | ||
run: sudo cp localhost.key /etc/ssl/private/localhost.key | ||
- name: Copy certificate itself | ||
run: sudo cp localhost.crt /usr/local/share/ca-certificates/localhost.crt | ||
- name: Add certificate to trusted list | ||
run: sudo update-ca-certificates | ||
- name: Update certificate key folder permissions | ||
run: sudo chmod -R 755 /etc/ssl/private | ||
- name: Update certificate key file permissions | ||
run: sudo chmod 644 /etc/ssl/private/localhost.key | ||
- name: Install Cardano tools | ||
uses: milos-ethernal/cardano-node-action@5a3bce7266cc1500d96e8fa63b3bb97135988482 | ||
- name: Install ogmios | ||
uses: milos-ethernal/ogmios-action@13e2be0b00da80f26bb8583fa129bd7c08856a49 | ||
- name: Checkout apex-bridge repo | ||
uses: actions/[email protected] | ||
with: | ||
repository: Ethernal-Tech/apex-bridge | ||
ref: main | ||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
- name: Build apex-bridge | ||
run: | | ||
go build | ||
sudo mv apex-bridge /usr/local/bin/ | ||
- name: Verify apex-bridge executable | ||
run: apex-bridge --help | ||
- name: Checkout blade | ||
uses: actions/[email protected] | ||
- name: Check certificate key permissions | ||
run: ls -l /etc/ssl/private/localhost.key | ||
- name: Run tests | ||
run: make test-e2e-apex-bridge | ||
- name: Run tests failed | ||
if: failure() | ||
id: run_e2e_apex_failure | ||
run: echo "test_output=false" >> $GITHUB_OUTPUT | ||
- name: Archive test logs | ||
if: always() | ||
uses: actions/[email protected] | ||
with: | ||
name: e2e-apex-bridge-logs | ||
path: e2e-logs-*/ | ||
retention-days: 30 |
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 |
---|---|---|
|
@@ -41,6 +41,20 @@ jobs: | |
uses: milos-ethernal/cardano-node-action@5a3bce7266cc1500d96e8fa63b3bb97135988482 | ||
- name: Install ogmios | ||
uses: milos-ethernal/ogmios-action@13e2be0b00da80f26bb8583fa129bd7c08856a49 | ||
- name: Checkout apex-bridge repo | ||
uses: actions/[email protected] | ||
with: | ||
repository: Ethernal-Tech/apex-bridge | ||
ref: main | ||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
- name: Build apex-bridge | ||
run: | | ||
go build | ||
sudo mv apex-bridge /usr/local/bin/ | ||
- name: Verify apex-bridge executable | ||
run: apex-bridge --help | ||
- name: Checkout blade | ||
uses: actions/[email protected] | ||
- name: Check certificate key permissions | ||
run: ls -l /etc/ssl/private/localhost.key | ||
- name: Run tests | ||
|
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
Oops, something went wrong.