From 9fa8b56137174a78f0dbbe90a314e6486dd2c479 Mon Sep 17 00:00:00 2001 From: Bas des Tombe Date: Mon, 25 Nov 2024 16:26:58 -0600 Subject: [PATCH] Add data validation workflow for testing forbidden file formats --- .github/workflows/data-validation.yml | 30 +++++++++++++++++++++++++++ .github/workflows/lint.yml | 26 +---------------------- 2 files changed, 31 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/data-validation.yml diff --git a/.github/workflows/data-validation.yml b/.github/workflows/data-validation.yml new file mode 100644 index 0000000..b54892c --- /dev/null +++ b/.github/workflows/data-validation.yml @@ -0,0 +1,30 @@ +on: + push: + branches: + - main + pull_request: + branches: + - main +jobs: + data-validation: + name: Test for forbidden file formats + runs-on: ubuntu-latest + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + strategy: + fail-fast: false + env: + HATCH_VERBOSE: 1 + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version-file: "pyproject.toml" + - name: Install uv + uses: astral-sh/setup-uv@v3 + - name: Install hatch + run: uv tool install hatch + - name: Test for forbidden file formats + run: hatch run test:pytest tests/test_forbidden_file_formats.py -v diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 06aaa8d..c4e55e6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -32,28 +32,4 @@ jobs: - name: Lint Python files run: hatch run lintformat:lint - name: Lint repository.yaml and check mockup folder structure - run: hatch run test:pytest tests/test_repository_yaml.py tests/test_mockup_folder_structure.py -v - - data-validation: - name: Test for forbidden file formats - runs-on: ubuntu-latest - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - strategy: - fail-fast: false - env: - HATCH_VERBOSE: 1 - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version-file: "pyproject.toml" - - name: Install uv - uses: astral-sh/setup-uv@v3 - - name: Install hatch - run: uv tool install hatch - - name: Test for forbidden file formats - run: hatch run test:pytest tests/test_forbidden_file_formats.py -v - + run: hatch run test:pytest tests/test_repository_yaml.py tests/test_mockup_folder_structure.py -v \ No newline at end of file