-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (40 loc) · 1.17 KB
/
selfhosted.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# CI workflow that runs on self hosted cluster
name: Self-hosted rules
on: push
jobs:
tests:
strategy:
matrix:
platform: ["dummy"]
fail-fast: false
runs-on: self-hosted
steps:
- name: Cleanup workspace manually
run: |
rm -rf _work/*
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}
- name: Install and configure poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
- name: Install qibolab stable
run: |
python -m venv testenv
source testenv/bin/activate
python -m pip install qibolab click
- name: Execute on ${{ matrix.platform }} queue
run: |
source testenv/bin/activate
PARTITION="$(python queues/queues.py dummy)"
srun -p $PARTITION python tests/minimal.py ${{ matrix.platform }}
- name: Notify the Pull Request
uses: thollander/actions-comment-pull-request@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message: |
Run on QPU `${{ matrix.platform }}` completed! :atom: