Skip to content

Continuous Integration with github

Artefacts Cloud Simulation can run your test jobs automatically when new code is pushed to your linked repository. The job to be run can be configured in the artefacts.yaml config file.

Currently, the only supported event time is push. You can select as many jobs as needed.

on:
  push:
    jobs:
      - job-name

Results will appear in the dashboard alongside other runs. Github triggered jobs contain additional metadata such as commit id.

If you have issues running continuous integration jobs, please confirm that your tests and package is working correctly, first by running them locally and then by confirming that the tests can run on artefacts cloud

Artefacts GitHub Action

For those wishing to integrate Artefacts Cloud Simulation as part of their CI workflow, you can add the art-e-fact/action-artefacts-ci@main action to your GitHub Workflow. The Action requires Python, and also an Artefacts Api Key (which can be created from the Dashboard) in order to run.

A basic example is provided below:

name: test
on: push

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.11]

    steps:
      - uses: actions/checkout@v3

      - name: Set Up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}

      - uses: art-e-fact/action-artefacts-ci@main
        with:
          artefacts-api-key: ${{ secrets.ARTEFACTS_API_KEY }}
          job-name: test_job
  • artefacts-api-key: Created in the Dashboard for your particular project.
  • job-name: Should match the job you wish to run in your artefacts.yaml file

The GitHub Action can be particulary useful if you have additional repositories your project requires to run. The following action can be used to clone that repository into your project before running Artefacts Cloud Simulation:

- name: Clone My Repo
  uses: actions/checkout@v3
  with:
    repository: my-org/my-repo
    token: ${{ secrets.MYREPO_PAT }} # if cloning a private repository
    path: my-repo
    ref: main