From 36c5282ac9b10f21c0c99b9583dcb3c3c6157bc7 Mon Sep 17 00:00:00 2001 From: Marc Foley Date: Mon, 3 Mar 2025 14:39:23 +0000 Subject: [PATCH] designers.yaml: move logic from test.yaml --- .ci/run.py | 2 +- .github/workflows/designers.yaml | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/designers.yaml diff --git a/.ci/run.py b/.ci/run.py index 3acc3939d7..3b95137c68 100644 --- a/.ci/run.py +++ b/.ci/run.py @@ -66,7 +66,7 @@ def main(): elif check_type == CheckType.DESIGNER: print(f"Checking designer profile: {directory}") - subprocess.run(["pytest", profile_test_file, directory]) + subprocess.run(["pytest", profile_test_file, directory], check=True) else: print(f"Skipping directory {directory}") diff --git a/.github/workflows/designers.yaml b/.github/workflows/designers.yaml new file mode 100644 index 0000000000..865746cf90 --- /dev/null +++ b/.github/workflows/designers.yaml @@ -0,0 +1,27 @@ +name: Check Designer profiles + +on: + pull_request: + paths: + - 'catalog/designers/*/*' + +jobs: + test_designer_profiles: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install dependencies + run: pip install gftools[qa] pytest + - name: Check designer profiles + run: | + python3 .ci/run.py --pr-number $PR_NUMBER --pr-url-body https://www.github.com/google/fonts/pull/ + env: + PYTHONIOENCODING: 'utf-8' + PYTHONUTF8: '1' + GH_TOKEN: ${{ github.token }} + PR_NUMBER: ${{ github.event.number }} \ No newline at end of file -- 2.47.2