Skip to content

Commit

Permalink
update all underscores to hyphens
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Sep 12, 2024
1 parent d5d468c commit c020876
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 28 deletions.
12 changes: 6 additions & 6 deletions .github/actions/get_test_info/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,34 @@ 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:
- uses: actions/checkout@v4

- 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
8 changes: 4 additions & 4 deletions .github/actions/should_release/action.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
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:
- uses: actions/checkout@v4
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}"
Expand All @@ -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
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand All @@ -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
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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) }}
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
npm install
if [[ "${{ matrix.azle_source }}" == "repo" ]]; then
if [[ "${{ matrix.azle-source }}" == "repo" ]]; then
npm link
fi
Expand All @@ -123,7 +123,7 @@ jobs:
run: |
npm install
if [[ "${{ matrix.azle_source }}" == "repo" ]]; then
if [[ "${{ matrix.azle-source }}" == "repo" ]]; then
npm link azle
fi
Expand Down

0 comments on commit c020876

Please sign in to comment.