GithubHelp home page GithubHelp logo

github-action's Introduction

GitHub Actions CI File for Ape Projects

This action allows you to use your favorte ape commands in the GitHub Actions CI environment, such as ape compile and ape test

Inputs

python-version

Optional Overrides the version of python used to run ape. Default is using Python '3.8'.

ape-version-pin

Optional Overrides the pin used to install eth-ape. Default is to use the latest version of eth-ape (no pin). Can also use a git+ value to install a branch, commit, or tag.

Example values:

  • 1.0.0
  • ==1.0.0
  • >=1.0.0,<2.0
  • git+https://github.com/your-github/ape.git@your-branch

ape-plugins-list

Optional Space-separated list of plugins to install. The default is to install from your project's local ape-config.yaml. If you do not have any plugin version constraints specified in your ape-config.yaml file, the default includes the -U (--upgrade) flag to ensure you get the latest plugin versons. Otherwise, it relies on the constraints you have configured.

To request specific versions of plugins, use a space-separated value like this 'plugin-a plugin-b==1.2.3 plugin-c>1.2'.

Outputs

ape-version

The version of Ape installed. This will either be the same as the ape-version-pin input if you provided that, else it will be the latest version found from pypi.

Example usage

steps:
  - uses: actions/checkout@v4
  - uses: ApeWorX/github-action@v2
    with:
      python-version: '3.10' # (optional)
      ape-version-pin: '>=0.7.0' # (optional)
      ape-plugins-list: 'solidity vyper==0.7.0' # (optional)
  - run: ape test -s

NOTE This action is still in development

github-action's People

Contributors

fubuloubu avatar antazoey avatar sabotagebeats avatar schlagonia avatar

Stargazers

MadMoneyLab avatar  avatar Sandalots avatar sudo rm -rf --no-preserve-root / avatar Weston Nelson avatar Wyatt Walsh avatar

Watchers

José I. O. avatar  avatar NotPeopling2day avatar

github-action's Issues

Support different commands

Allow the end user of this in actions to call differnet commands like ape compile --size and ape test (and maybe ape run my_script?)

Automate updating tags

The idea is that when a new tag is published e.g. v1.3 that the corresponding major version tag should also get updated e.g. v1

This would help streamline the updates for this plugin without manual tagging

Also note probably good to design a more advanced testing and release process for this action (uses: ApeWorX/github-action@main?)

plugins list causes workflow to fail

When trying to specify a version for any plugin used, the Github action will fail due to the automatic inclusion of the -U in the installation call https://github.com/ApeWorX/github-action/blob/main/action.yml#L61, with the error "ERROR: Cannot use '--upgrade' option when specifying a version for plugin x".

This happened both when specifying a version using the "ape-plugins-list" flag in the test.yaml as well as when specifying a version in the ape-config.yaml.

Current work around that does work was to put all plugins and versions in a requirements.txt file.

Install geth if `geth --dev` is used for testing

Using the geth plugin for testing won't function without geth binary present, so make sure we add this (and cache it) if we detect that plugin in use

Not as sure how to do this one because ape-geth is installed by default, a little deeper introspection needed to show that we are indeed using geth --dev within the test suite

`Path Validation Error` in Post Setup Ape [APE-1158]

For replication, see this run and go to the section Post Setup Ape

Post job cleanup.
Post job cleanup.
Cache hit occurred on the primary key [3](https://github.com/pcaversaccio/snekmate/actions/runs/5430063261/jobs/9875534341#step:30:3).11-pip-, not saving cache.
Post job cleanup.
Post job cleanup.
Cache hit occurred on the primary key Linux-build-cache, not saving cache.
Post job cleanup.
Warning: Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.

Allow installing dependencies

For tests and scripts (and occasionally new versions of Vyper that haven't released yet), it would be really handy to install additional requirements besides what the base image of ape specifies, maybe something like

  - uses: ApeWorX/ape-action@main
    with:
      install: requirements.txt  # Installs via `pip install -r requirements.txt` prior to run

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.