Skip to content

Release finishing touches #5903

Release finishing touches

Release finishing touches #5903

Workflow file for this run

# This GitHub Action flow works as follows:
# Each directory in the examples and tests directory represents an example project and is intended to have tests that ensure the canisters contained in that example function properly.
# These tests are currently written in TypeScript and are intended to be run in a Node.js environment.
# This GitHub Action takes care of deploying to npm and GitHub.
name: Test
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- ready_for_review
- reopened
workflow_dispatch:
inputs:
fuzz:
description: 'Run fuzz tests'
required: true
type: boolean
default: false
exclude-slow-tests:
description: 'Exclude slow tests'
required: true
type: boolean
default: true
exclude-unstable-tests:
description: 'Exclude unstable tests'
required: true
type: boolean
default: true
exclude-release-only-tests:
description: 'Exclude release only tests'
required: true
type: boolean
default: true
jobs:
get-exclude-dirs:
name: Get exclude directories
runs-on: ubuntu-latest
outputs:
exclude-dirs: ${{ steps.get-exclude-dirs.outputs.exclude-dirs }}
steps:
- uses: actions/checkout@v4
- id: set-conditions
uses: ./.github/actions/set_run_conditions
- id: determine-exclusions
uses: ./.github/actions/determine_exclusions
with:
is_workflow_dispatch: ${{ github.event_name == 'workflow_dispatch' }}
exclude_slow_input: ${{ inputs.exclude-slow-tests }}
exclude_unstable_input: ${{ inputs.exclude-unstable-tests }}
exclude_release_only_input: ${{ inputs.exclude-release-only-tests }}
is_feature_branch_draft_pr: ${{ steps.set-conditions.outputs.is_feature_branch_draft_pr }}
is_feature_branch_pr: ${{ steps.set-conditions.outputs.is_feature_branch_pr }}
is_main_branch_push: ${{ steps.set-conditions.outputs.is_main_branch_push }}
- id: get-exclude-dirs
uses: ./.github/actions/get_exclude_dirs
with:
exclude-slow: ${{ steps.determine-exclusions.outputs.exclude_slow }}
exclude-unstable: ${{ steps.determine-exclusions.outputs.exclude_unstable }}
exclude-release-only: ${{ steps.determine-exclusions.outputs.exclude_release_only }}
run-tests:
name: ${{ matrix.test_group.name }}
needs:
- get-exclude-dirs
strategy:
fail-fast: false
matrix:
test_group:
- { name: 'Examples', directories: './examples' }
- {
name: 'Examples (Experimental)',
directories: './examples',
run_experimental: true
}
- {
name: 'E2E Class',
directories: './tests/end_to_end/candid_rpc/class_syntax'
}
- {
name: 'E2E Class (Experimental)',
directories: './tests/end_to_end/candid_rpc/class_syntax',
run_experimental: true
}
- {
name: 'E2E Functional',
directories: './tests/end_to_end/candid_rpc/functional_syntax'
}
- {
name: 'E2E HTTP Server',
directories: './tests/end_to_end/http_server'
}
- {
name: 'Property Class',
directories: './tests/property/candid_rpc/class_api'
}
- {
name: 'Property Class (Experimental)',
directories: './tests/property/candid_rpc/class_api',
run_experimental: true
}
- {
name: 'Property Functional',
directories: './tests/property/candid_rpc/functional_api'
}
- {
name: 'Property IC API',
directories: './tests/property/ic_api'
}
- {
name: 'Property IC API (Experimental)',
directories: './tests/property/ic_api',
run_experimental: true
}
uses: ./.github/workflows/get_and_run_tests.yml
with:
directories: ${{ matrix.test_group.directories }}
exclude-dirs: ${{ needs.get-exclude-dirs.outputs.exclude-dirs }}
run_experimental: ${{ matrix.test_group.run_experimental || false }}
fuzz: ${{ inputs.fuzz || false }}
check-test-success:
name: Check Azle tests succeeded
needs: run-tests
runs-on: ubuntu-latest
if: success()
steps:
- run: exit 0
check-test-failure:
name: Check Azle tests didn't fail
needs: run-tests
runs-on: ubuntu-latest
if: failure()
steps:
- run: exit 1