-
Notifications
You must be signed in to change notification settings - Fork 10
39 lines (37 loc) · 1.22 KB
/
pytest.yaml
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
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' | 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") ) )' {} \;
- name: Run pytest-workflow
run: |
pytest --git-aware --basetemp /home/runner/work/pytest --symlink --tag ${{ matrix.tag }}