Skip to content

[PROPOSAL] Allow to run crystal circleci tests for contributors #272

Open
@miry

Description

@miry

Currently it is required core developers, who has access to crystal-lang/crystal to run tests and dist jobs. It is not effective with more contributors.

circleci allows to trigger pipelines with custom paramaters.
Example:

export CIRCLECI_API_KEY=<generate from circleci> : Create token in https://app.circleci.com/settings/user/tokens
export CRYSTAL_BRANCH="release/1.10" : against what crystal branch execute distribution-scripts
export FORK_OWNER=miry : PR authors nick
export FORK_BRANCH=<branch> : branch of PR in <user>/distribution-scripts

curl --request POST \
     --url "https://circleci.com/api/v2/project/github/${FORK_OWNER}/crystal/pipeline" \
     --header "Circle-Token: ${CIRCLECI_API_KEY}" \
     --header "content-type: application/json" \
     --data '{"branch":"'$CRYSTAL_BRANCH'","parameters":{"run_distribution_scripts_tests":true,"distribution-scripts-repo":"https://github.com/'$FORK_OWNER'/distribution-scripts.git","distribution-scripts-version":"'$FORK_BRANCH'"}}'

sample circleci workflow
image

TODO:

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions