1
0
mirror of https://github.com/ilri/csv-metadata-quality.git synced 2025-02-28 20:48:46 +01:00

38 lines
1.2 KiB
YAML
Raw Normal View History

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Build and Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
2023-09-04 14:26:25 +00:00
- uses: actions/checkout@v4
2025-01-30 11:55:09 +03:00
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: 'latest'
2025-01-30 11:55:09 +03:00
- run: uv sync
- name: Test with pytest
2025-01-30 11:56:27 +03:00
run: uv run pytest
2020-12-14 23:47:09 +02:00
- name: Test CLI
run: |
2021-12-24 14:47:25 +02:00
# Basic test
2025-01-30 11:55:09 +03:00
uv run csv-metadata-quality -i data/test.csv -o /tmp/test.csv
2021-12-24 14:47:25 +02:00
# Test with unsafe fixes
2025-01-30 11:55:09 +03:00
uv run csv-metadata-quality -i data/test.csv -o /tmp/test.csv -u
2021-12-24 14:47:25 +02:00
# Test with experimental checks
2025-01-30 11:55:09 +03:00
uv run csv-metadata-quality -i data/test.csv -o /tmp/test.csv -e
2021-12-24 14:47:25 +02:00
# Test with AGROVOC validation
2025-01-30 11:55:09 +03:00
uv run csv-metadata-quality -i data/test.csv -o /tmp/test.csv --agrovoc-fields dcterms.subject
2021-12-24 14:47:25 +02:00
# Test with AGROVOC validation (and dropping invalid)
2025-01-30 11:55:09 +03:00
uv run csv-metadata-quality -i data/test.csv -o /tmp/test.csv --agrovoc-fields dcterms.subject -d