Skip to content
/ actions Public

GitHub Actions used by IIASA repositories

License

Notifications You must be signed in to change notification settings

iiasa/actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actions and reusable workflows

GitHub Actions and reusable workflows used by IIASA repositories.

Actions

iiasa/actions/setup-conda

Set up Anaconda or Miniconda.

iiasa/actions/setup-gams

Set up GAMS.

Reusable workflows

See GitHub's documentation pages on “Reusing workflows”. The usage examples are from the workflows of the same name in iiasa/ixmp

lint.yaml

Lint and check Python code with black, flake8, isort, and mypy.

  • Source.

  • Usage example:

    name: Lint
    
    on:  # Run the workflow on pushes to `main`, or new commits on PRs into `main`
      push:
        branches: [ main ]
      pull_request:
        branches: [ main ]
    
    jobs:
      lint:
        uses: iiasa/actions/.github/workflows/lint.yaml@main
        with:
          max-complexity: 15
          python-version: "3.10"
          type-hint-packages: pytest genno GitPython xarray sphinx types-setuptools

publish.yaml

Build Python package distributions, check with twine, and publish to (Test)PyPI.

  • Source

  • Usage example:

    name: Build package and publish
    
    on:
      pull_request:
        branches: [ main ]  # Package is built and checked
      push:
        branches: [ main ]  # Package is built and checked
        tags: [ "v*" ]  # Package is published to PyPI
      release:
        types: [ published ]  # Package is also published to PyPI
    
    jobs:
      publish:
        uses: iiasa/actions/.github/workflows/publish.yaml@main
        secrets:
          PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
        # Publish to TestPyPI; omit with: to publish to PyPI itself
        with:
          repository-url: https://test.pypi.org/legacy/