Merge pull request #22 from oasis-open/fix-yaml #38
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: cti-python-stix2-extensions test harness | |
on: | |
push: | |
paths: | |
- '**.py' | |
- '**/tox.ini' | |
- '**/pyproject.toml' | |
- '.github/workflows/**.yml' | |
pull_request: | |
paths: | |
- '**.py' | |
- '**/tox.ini' | |
- '**/pyproject.toml' | |
- '.github/workflows/**.yml' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9, '3.10', '3.11', '3.12'] | |
name: Python ${{ matrix.python-version }} Build | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install and update essential dependencies | |
run: | | |
pip install -U pip setuptools | |
pip install tox-gh-actions | |
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 | |
id: filter | |
with: | |
filters: | | |
incident-ef7: | |
- 'incident-ef7/**' | |
observed-string-8b1: | |
- 'observed-string-8b1/**' | |
identity-66e: | |
- 'identity-66e/**' | |
pap-marking-definition-f8d: | |
- 'pap-marking-definition-f8d/**' | |
cui-marking-definition-dff: | |
- 'cui-marking-definition-dff/**' | |
- name: Test incident-ef7 with Tox | |
if: ${{ steps.filter.outputs.incident-ef7 == 'true' }} | |
run: | | |
tox -c incident-ef7/tox.ini | |
- name: Skip testing incident-ef7 with Tox | |
if: ${{ steps.filter.outputs.incident-ef7 != 'true' }} | |
run: | | |
echo "Skipped incident-ef7 tests due to no changes" | |
- name: Test observed-string-8b1 with Tox | |
if: ${{ steps.filter.outputs.observed-string-8b1 == 'true' }} | |
run: | | |
tox -c observed-string-8b1/tox.ini | |
- name: Skip testing observed-string-8b1 with Tox | |
if: ${{ steps.filter.outputs.observed-string-8b1 != 'true' }} | |
run: | | |
echo "Skipped observed-string-8b1 tests due to no changes" | |
- name: Test identity-66e with Tox | |
if: ${{ steps.filter.outputs.identity-66e == 'true' }} | |
run: | | |
tox -c identity-66e/tox.ini | |
- name: Skip testing identity-66e with Tox | |
if: ${{ steps.filter.outputs.identity-66e != 'true' }} | |
run: | | |
echo "Skipped identity-66e tests due to no changes" | |
- name: Test pap-marking-definition-f8d with Tox | |
if: ${{ steps.filter.outputs.pap-marking-definition-f8d == 'true' }} | |
run: | | |
tox -c pap-marking-definition-f8d/tox.in | |
- name: Skip testing pap-marking-definition-f8d with Tox | |
if: ${{ steps.filter.outputs.pap-marking-definition-f8d != 'true' }} | |
run: | | |
echo "Skipped pap-marking-definition-f8d tests due to no changes" | |
- name: Test cui-marking-definition-dff with Tox | |
if: ${{ steps.filter.outputs.cui-marking-definition-dff == 'true' }} | |
run: | | |
tox -c cui-marking-definition-dff/tox.ini | |
- name: Skip testing cui-marking-definition-dff with Tox | |
if: ${{ steps.filter.outputs.cui-marking-definition-dff != 'true' }} | |
run: | | |
echo "Skipped cui-marking-definition-dff tests due to no changes" |