feat: convenience wrapper workflow #581
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: pytest-workflow Check | |
on: [push] | |
jobs: | |
list-tags: | |
runs-on: ubuntu-latest | |
outputs: | |
tags: ${{ steps.set-tags.outputs.tags }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: set tags | |
id: set-tags | |
run: echo "tags=$(find tests -name '*.yaml' -exec yq --output-format yaml '.[].tags[] ' {} \;| sort | uniq | grep -vE 'deprecated|miniwdl|cellranger' | jq -ncR '[inputs]')" >> $GITHUB_OUTPUT | |
pytest_check: | |
needs: list-tags | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
tag: ${{ fromJson(needs.list-tags.outputs.tags) }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install miniwdl and pytest-workflow | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
- name: filter tests | |
run: | | |
find tests -name '*.yaml' -exec yq --output-format yaml -i 'del(.[] | select(.tags[] | test("reference|deprecated|cellranger") ) )' {} \; | |
- name: Run pytest-workflow | |
run: | | |
pytest --git-aware --basetemp /home/runner/work/pytest --symlink --tag ${{ matrix.tag }} |