ci: test plugin and rdmo setup #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
# run CI only if files in these whitelisted paths are changed | |
paths: | |
- '.github/workflows/**' | |
- 'rdmo_radar/**' | |
- 'testing/**' | |
- 'tests/**' | |
- .pre-commit-config.yaml | |
- pyproject.toml | |
# Ref: https://docs.github.com/en/actions/using-jobs/using-concurrency | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
FORCE_COLOR: 1 # colored output by pytest etc. | |
jobs: | |
lint: | |
uses: rdmorganiser/.github/.github/workflows/_lint.yml@main | |
test: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Checkout "testing" directory rdmo repository | |
uses: actions/checkout@v4 | |
with: | |
repository: rdmorganiser/rdmo | |
sparse-checkout: testing | |
path: rdmo | |
- name: Merge rdmo/testing with plugin testing directory | |
run: cp -r rdmo/testing/* testing && rm -r rdmo | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: pip | |
- run: python -m pip install --editable ".[dev]" | |
- run: python -m pip list | |
- run: pytest -s | |
# dev-setup: | |
# # Ref: structlog (MIT licensed) <https://github.com/hynek/structlog/blob/main/.github/workflows/ci.yml> | |
# name: "Test dev setup on ${{ matrix.os }}" | |
# runs-on: ${{ matrix.os }} | |
# strategy: | |
# matrix: | |
# os: [ubuntu-latest, windows-latest, macos-latest] | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: actions/setup-python@v4 | |
# with: | |
# python-version: "3.12" | |
# cache: pip | |
# - run: python -Im pip install -e .[dev] | |
# - run: python -Ic 'import rdmo_radar; print(rdmo_radar.__version__)' | |
required-checks-pass: | |
if: always() | |
needs: | |
- lint | |
# - dev-setup | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |