Skip to content

Commit

Permalink
move get and run tests to a workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Oct 8, 2024
1 parent bcedb3b commit 6f135d8
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 45 deletions.
35 changes: 0 additions & 35 deletions .github/actions/get_and_run_tests/action.yml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/get_and_run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Get and Run Tests

on:
workflow_call:
inputs:
directories:
required: true
type: string
exclude-dirs:
required: false
type: string
default: ''
include_npm:
required: true
type: boolean
os:
required: true
type: string
secrets:
ETHEREUM_URL:
required: true

jobs:
get-test-infos:
runs-on: ubuntu-latest
outputs:
test-infos: ${{ steps.get-test-infos.outputs.test-infos }}
steps:
- uses: actions/checkout@v4
- id: get-test-infos
uses: ./.github/actions/get_test_infos
with:
directories: ${{ inputs.directories }}
exclude-dirs: ${{ inputs.exclude-dirs }}

run-tests:
needs: get-test-infos
uses: ./.github/workflows/run-test.yml
with:
test_infos: ${{ needs.get-test-infos.outputs.test-infos }}
include_npm: ${{ inputs.include_npm }}
os: ${{ inputs.os }}
secrets:
ETHEREUM_URL: ${{ secrets.ETHEREUM_URL }}
18 changes: 8 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,14 @@ jobs:
directories: './tests/property/candid_rpc/functional_api'
}
- { name: 'IC API', directories: './tests/property/ic_api' }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/get_and_run_tests
with:
directories: ${{ matrix.test_group.directories }}
exclude-dirs: ${{ needs.set-exclude-dirs.outputs.exclude-dirs }}
include_npm: ${{ (github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, 'Merge pull request') && contains(github.event.head_commit.message, 'demergent-labs/release--')) || contains(github.head_ref, 'release--') }}
os: '["ubuntu-latest"]'
ethereum_url: ${{ secrets.ETHEREUM_URL }}
uses: ./.github/workflows/get_and_run_tests.yml
with:
directories: ${{ matrix.test_group.directories }}
exclude-dirs: ${{ needs.set-exclude-dirs.outputs.exclude-dirs }}
include_npm: ${{ (github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, 'Merge pull request') && contains(github.event.head_commit.message, 'demergent-labs/release--')) || contains(github.head_ref, 'release--') }}
os: '["ubuntu-latest"]'
secrets:
ETHEREUM_URL: ${{ secrets.ETHEREUM_URL }}

check-test-success:
name: Check Azle tests succeeded
Expand Down

0 comments on commit 6f135d8

Please sign in to comment.