Skip to content

edgetest-dev/run-edgetest-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

run-edgetest-action

example workflow

The run edgetest action lets you run edgetest against your Python libray. It will loop through your project's dependencies, and check if your project is compatible with the latest version of each dependency.

The action assumes the following:

  • Your repo is already configured to use edgetest.
    • eg: you have a section in your setup.cfg for edgetest
  • runs on ubuntu-latest, Python 3.10.x, and the latest edgetest, edgetest-conda, and edgetest-pip-tools
  • any external setup for your tests to pass outside the command passed to edgetest is done before the call.

Example of usage:

on:
  schedule:
    - cron:  '5 9 * * 1'
jobs:
  hello_world_job:
    runs-on: ubuntu-latest
    name: running edgetest
    steps:
      - uses: actions/checkout@v2
        with:
          ref: develop
      - name: Copy files for locopy
        id: copy-files
        run: |
          cp tests/data/.locopyrc ~/.locopyrc
          cp tests/data/.locopy-sfrc ~/.locopy-sfrc
      - id: run-edgetest
        uses: edgetest-dev/[email protected]
        with:
          edgetest-flags: '-c setup.cfg -r requirements.txt --export'
          base-branch: 'develop'
          skip-pr: 'false'
          python-version: 3.10
  • Typically, you will want to run the action on some cron schedule as its own workflow
  • It should use ubuntu
  • Checkout your repo and point it to your default branch (the one to run edgetest against).
    • This branch should have your edgetest configuration.
  • (Optional) Do any preparation for your testing or other housekeeping. In this example we needed to copy some file to the home directory for our testing to work.
  • Finally, you can call the edgetest action

Options

option desc default examples
edgetest-flags options to pass to the edgetest call. Everything after edgetest .... "" '-c setup.cfg -r requirements.txt --export'
base-branch the branch which you want to PR against if there are changes. This is typically your development branch 'dev' 'develop'
skip-pr skips the action summiting a PR if there are any changes. 'true' or 'false'
python-version Python version to use (from "setup-miniconda"). 3.10 3.7, 3.8, 3.9, 3.10

Action Dependencies

Uses:

Contributing

See our developer documentation.

License

MIT