diff --git a/.github/actions/get_test_info/action.yml b/.github/actions/get_test_info/action.yml index 5efece8879..d1b0c21273 100644 --- a/.github/actions/get_test_info/action.yml +++ b/.github/actions/get_test_info/action.yml @@ -13,18 +13,18 @@ inputs: directories: description: List of directories to search for npm projects with an npm test script required: true - exclude_dirs: + exclude-dirs: description: List of directories to exclude from the search required: false default: '' - node_version: + node-version: description: The version of Node.js to use required: true default: '20.x' outputs: tests: description: All of the test info objects found by this action - value: ${{ steps.get_tests.outputs.tests }} + value: ${{ steps.get-test-infos.outputs.tests }} runs: using: composite steps: @@ -32,15 +32,15 @@ runs: - uses: actions/setup-node@v4 with: - node-version: ${{ inputs.node_version }} + node-version: ${{ inputs.node-version }} - name: Get test infos - id: get_test_infos + id: get-test-infos run: | # Export the input variables to make them available to the script export INPUT_DIRECTORIES="${{ inputs.directories }}" export INPUT_EXCLUDE_DIRS="${{ inputs.exclude_dirs }}" # Run the script - testInfos=$(./.github/actions/get_tests/get_test_info.sh | base64 -d) + testInfos=$(./.github/actions/get_tests/get_test_infos.sh | base64 -d) echo "testsInfos=${testInfos}" >> "$GITHUB_OUTPUT" shell: bash diff --git a/.github/actions/get_test_info/get_test_info.sh b/.github/actions/get_test_info/get_test_infos.sh similarity index 100% rename from .github/actions/get_test_info/get_test_info.sh rename to .github/actions/get_test_info/get_test_infos.sh diff --git a/.github/actions/should_release/action.yml b/.github/actions/should_release/action.yml index a8a208ebf0..27604d9b05 100644 --- a/.github/actions/should_release/action.yml +++ b/.github/actions/should_release/action.yml @@ -1,9 +1,9 @@ name: Should release description: Determines if the current pull request is for testing or for starting a release outputs: - should_release: + should-release: description: Returns true if this branch should start a release, otherwise false - value: ${{ steps.determine_should_release.outputs.should_release }} + value: ${{ steps.determine-should-release.outputs.should-release }} runs: using: composite steps: @@ -11,7 +11,7 @@ runs: with: ref: ${{ github.event.pull_request.head.ref }} # This is necessary for this job to be able to get the correct commit message from `git log` - - id: determine_should_release + - id: determine-should-release run: | BRANCH_NAME="${{ github.head_ref }}" RELEASE_VERSION="${BRANCH_NAME:9}" @@ -23,5 +23,5 @@ runs: SHOULD_RELEASE="true" fi - echo "should_release=${SHOULD_RELEASE}" >> "$GITHUB_OUTPUT" + echo "should-release=${SHOULD_RELEASE}" >> "$GITHUB_OUTPUT" shell: bash diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3384fa4629..acaa8a8673 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,25 +13,25 @@ jobs: name: Determine if this branch should release runs-on: ubuntu-latest outputs: - should_release: ${{ steps.determine_should_release.outputs.should_release }} + should-release: ${{ steps.determine-should-release.outputs.should-release }} steps: - uses: actions/checkout@v4 - - id: determine_should_release + - id: determine-should-release uses: ./.github/actions/should_release get-test-infos: needs: determine-should-release - if: ${{ startsWith(github.head_ref, 'release--') && needs.determine-should-release.outputs.should_release }} + if: ${{ startsWith(github.head_ref, 'release--') && needs.determine-should-release.outputs.should-release }} name: Get test infos runs-on: ubuntu-latest outputs: - test-infos: ${{ steps.get_test_infos.outputs.tests }} + test-infos: ${{ steps.get-test-infos.outputs.tests }} steps: - uses: actions/checkout@v4 - name: Get all test infos - id: get_test_infos + id: get-test-infos uses: ./.github/actions/get_test_infos with: directories: | @@ -41,7 +41,7 @@ jobs: release: name: Deploy release # Only run this job if it's a release branch. This job will run instead of run-tests and will automatically publish another commit which will be tested - if: ${{ needs.determine-should-release.outputs.should_release == 'true' }} + if: ${{ needs.determine-should-release.outputs.should-release == 'true' }} needs: - determine-should-release - get-test-infos @@ -65,7 +65,7 @@ jobs: - name: Install curl (if necessary) run: sudo apt-get install curl -y - - name: Install Rust from global_dependencies + - name: Install global dependencies run: ./.github/scripts/install_global_dependencies.sh - name: Install dfx diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1d31b9ce58..b6e797be4a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest outputs: # If the branch should release then it shouldn't run tests. - should-run-tests: ${{ steps.determine-should-run-tests.outputs.should_release == 'false' }} + should-run-tests: ${{ steps.determine-should-run-tests.outputs.should-release == 'false' }} steps: - uses: actions/checkout@v4 @@ -45,7 +45,7 @@ jobs: directories: | ./examples ./tests - exclude_dirs: | + exclude-dirs: | ${{ env.IS_FEATURE_BRANCH_PR == 'true' && format(' ./examples/basic_bitcoin ./examples/bitcoin_psbt @@ -58,7 +58,7 @@ jobs: ') || '' }} run-test: - name: '${{matrix.tests.name}} | ${{matrix.tests.type}} | ${{matrix.tests.syntax}} | ${{matrix.tests.api}} | ${{matrix.azle_source}}' + name: '${{matrix.tests.name}} | ${{matrix.tests.type}} | ${{matrix.tests.syntax}} | ${{matrix.tests.api}} | ${{matrix.azle-source}}' needs: - determine-should-run-tests - get-test-infos @@ -67,23 +67,23 @@ jobs: env: ETHEREUM_URL: ${{ secrets.ETHEREUM_URL }} AZLE_IDENTITY_STORAGE_MODE: 'plaintext' - AZLE_END_TO_END_TEST_LINK_AZLE: ${{ matrix.azle_source == 'repo' }} + AZLE_END_TO_END_TEST_LINK_AZLE: ${{ matrix.azle-source == 'repo' }} AZLE_TEST_RUN_ON_RELEASE: ${{ startsWith(github.head_ref, 'release--') }} strategy: fail-fast: false # We want to see which example tests succeed and which ones fail, we don't want one example test to cancel the rest matrix: # spins up one job per combination of test and code source (repo or npm). # os: [macos-latest] os: [ubuntu-latest] - include_npm: + include-npm: # Only include npm in the matrix if you've pushed to main and the last commit was a merge of a release branch, or the base branch of the pull request is a release branch - ${{ (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--') }} - azle_source: + azle-source: - npm - repo exclude: - - include_npm: false - azle_source: npm - - include_npm: true + - include-npm: false + azle-source: npm + - include-npm: true azle_source: repo # If should_run_tests is false, we still want the steps of this job to execute so that check-run-test-success will run. We do this by creating an array with one dummy element tests: ${{ fromJSON(needs.get-test-infos.outputs.test-infos) }} @@ -112,7 +112,7 @@ jobs: npm install - if [[ "${{ matrix.azle_source }}" == "repo" ]]; then + if [[ "${{ matrix.azle-source }}" == "repo" ]]; then npm link fi @@ -123,7 +123,7 @@ jobs: run: | npm install - if [[ "${{ matrix.azle_source }}" == "repo" ]]; then + if [[ "${{ matrix.azle-source }}" == "repo" ]]; then npm link azle fi