Continuous Integration with github
Artefacts Cloud Simulation can run your test jobs when new code is pushed to your repository. For that, you simply need to trigger a run-remote
in your favourite CI tool.
Results will appear in the dashboard alongside other jobs. 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 Github 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 yourartefacts.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