From dcff5eefc22f378c143cbce2e801fdab0467b587 Mon Sep 17 00:00:00 2001 From: AlexWells Date: Wed, 18 Sep 2024 15:09:41 +0100 Subject: [PATCH] Run CI using dependencies from GH master branches This should allow us to spot upcoming issues before releases are made. Done as part of a request from Michael Davidsaver. --- .github/workflows/code.yml | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code.yml b/.github/workflows/code.yml index 0a0446ca..eef98030 100644 --- a/.github/workflows/code.yml +++ b/.github/workflows/code.yml @@ -56,7 +56,6 @@ jobs: os: [ubuntu-latest, windows-latest, macos-13] python: [cp37, cp38, cp39, cp310, cp311, cp312] - include: # Put coverage and results files in the project directory for mac - os: macos-13 @@ -128,9 +127,7 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-13] python: [cp37, cp38, cp39, cp310, cp311, cp312] - runs-on: ${{ matrix.os }} - steps: - uses: actions/download-artifact@v4 with: @@ -167,3 +164,35 @@ jobs: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.pypi_token }} run: pipx run twine upload dist/* + + # Check that the master branches of various upstream dependencies are + # still compatible when used together + master_branch_test: + if: ${{ github.event_name == 'schedule' }} + runs-on: "ubuntu-latest" + steps: + - name: Checkout Source + uses: actions/checkout@v4 + with: + # require history to get back to last tag for version number of branches + fetch-depth: 0 + submodules: true + + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: "3.12" + + - name: Install master versions + # Note the install order here: By installing p4p first, then pvxs and epicscorelibs using the --no-warn-conflicts + # flag, we can bypass the dependency mismatch which would otherwise be present. We know that the master branches + # *should* always work together, so it's ok to ignore the warnings. + run: | + pip install git+https://github.com/epics-base/p4p.git git+https://github.com/epics-base/pvxs.git git+https://github.com/epics-base/epicscorelibs.git + pip install git+https://github.com/DiamondLightSource/aioca git+https://github.com/DiamondLightSource/cothread + pip install -e .[dev] + pip freeze + + - name: Run tests + run: | + python -m pytest