From bf527aed1e1894c85817892cd30f32f2576e9ffc Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Mon, 11 Nov 2024 18:17:47 +0000 Subject: [PATCH 1/3] add action for checking every day against ophyd-async and bluesky main branches --- .github/workflows/test-against-main.yml | 39 +++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/test-against-main.yml diff --git a/.github/workflows/test-against-main.yml b/.github/workflows/test-against-main.yml new file mode 100644 index 0000000..9bf3795 --- /dev/null +++ b/.github/workflows/test-against-main.yml @@ -0,0 +1,39 @@ +name: test-against-main +on: + schedule: + - cron: "0 0 * * *" +jobs: + call-linter-workflow: + uses: ISISComputingGroup/reusable-workflows/.github/workflows/linters.yml@main + with: + compare-branch: origin/main + python-ver: '3.11' + tests: + runs-on: ubuntu-latest + strategy: + matrix: + version: ['3.10','3.11'] # ,'3.12'] # also check on 3.12 once https://github.com/bluesky/ophyd-async/pull/478 is merged. + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.version }} + - name: install requirements + run: pip install -e .[dev] + - name: install latest bluesky and ophyd-async + run: pip install --upgrade --force-reinstall git+https://github.com/bluesky/bluesky.git@main git+https://github.com/bluesky/ophyd-async.git@main + - name: run pytest + run: python -m pytest + results: + if: ${{ always() }} + runs-on: ubuntu-latest + name: Final Results + needs: [call-linter-workflow, tests] + steps: + - run: exit 1 + # see https://stackoverflow.com/a/67532120/4907315 + if: >- + ${{ + contains(needs.*.result, 'failure') + || contains(needs.*.result, 'cancelled') + }} From da54eed701946cc425332b12893d67316d14e7d1 Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Tue, 12 Nov 2024 12:12:31 +0000 Subject: [PATCH 2/3] Update test-against-main.yml --- .github/workflows/test-against-main.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-against-main.yml b/.github/workflows/test-against-main.yml index 9bf3795..40ae6e5 100644 --- a/.github/workflows/test-against-main.yml +++ b/.github/workflows/test-against-main.yml @@ -3,11 +3,6 @@ on: schedule: - cron: "0 0 * * *" jobs: - call-linter-workflow: - uses: ISISComputingGroup/reusable-workflows/.github/workflows/linters.yml@main - with: - compare-branch: origin/main - python-ver: '3.11' tests: runs-on: ubuntu-latest strategy: @@ -22,13 +17,17 @@ jobs: run: pip install -e .[dev] - name: install latest bluesky and ophyd-async run: pip install --upgrade --force-reinstall git+https://github.com/bluesky/bluesky.git@main git+https://github.com/bluesky/ophyd-async.git@main + - name: run ruff + run: python -m ruff --check + - name: run pyright + run: python -m pyright - name: run pytest run: python -m pytest results: if: ${{ always() }} runs-on: ubuntu-latest name: Final Results - needs: [call-linter-workflow, tests] + needs: [tests] steps: - run: exit 1 # see https://stackoverflow.com/a/67532120/4907315 From a7ea2b80ba06d5ef4a3a728dedb5560c1de3fd65 Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Tue, 12 Nov 2024 12:12:54 +0000 Subject: [PATCH 3/3] Update test-against-main.yml --- .github/workflows/test-against-main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-against-main.yml b/.github/workflows/test-against-main.yml index 40ae6e5..34fae25 100644 --- a/.github/workflows/test-against-main.yml +++ b/.github/workflows/test-against-main.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: ['3.10','3.11'] # ,'3.12'] # also check on 3.12 once https://github.com/bluesky/ophyd-async/pull/478 is merged. + version: ['3.11', "3.12"] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5