From cd789960cf23ff279303c6531c8c0d9d6761b2e7 Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Fri, 17 Mar 2023 10:11:58 +0100 Subject: [PATCH] Separate spacy universe validation into a separate workflow --- .github/workflows/tests.yml | 23 ++-------------- .github/workflows/universe_validation.yml | 32 +++++++++++++++++++++++ 2 files changed, 34 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/universe_validation.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index eef24ff33..41ea6ce50 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,30 +9,14 @@ on: paths-ignore: - "*.md" - "*.mdx" - - "website/docs/**" - - "website/src/**" - - "website/meta/*.tsx" - - "website/meta/*.mjs" - - "website/meta/languages.json" - - "website/meta/site.json" - - "website/meta/sidebars.json" - - "website/meta/type-annotations.json" - - "website/pages/**" + - "website/**" - ".github/workflows/**" pull_request: types: [opened, synchronize, reopened, edited] paths-ignore: - "*.md" - "*.mdx" - - "website/docs/**" - - "website/src/**" - - "website/meta/*.tsx" - - "website/meta/*.mjs" - - "website/meta/languages.json" - - "website/meta/site.json" - - "website/meta/sidebars.json" - - "website/meta/type-annotations.json" - - "website/pages/**" + - "website/**" jobs: validate: @@ -56,9 +40,6 @@ jobs: run: | python -m pip install flake8==5.0.4 python -m flake8 spacy --count --select=E901,E999,F821,F822,F823,W605 --show-source --statistics - - name: Validate website/meta/universe.json - run: | - python .github/validate_universe_json.py website/meta/universe.json tests: name: Test needs: Validate diff --git a/.github/workflows/universe_validation.yml b/.github/workflows/universe_validation.yml new file mode 100644 index 000000000..a77772c5d --- /dev/null +++ b/.github/workflows/universe_validation.yml @@ -0,0 +1,32 @@ +name: tests + +on: + push: + branches-ignore: + - "spacy.io" + - "nightly.spacy.io" + - "v2.spacy.io" + paths: + - "website/meta/universe.json" + pull_request: + types: [opened, synchronize, reopened, edited] + paths: + - "website/meta/universe.json" + +jobs: + validate: + name: Validate + runs-on: ubuntu-latest + steps: + - name: Check out repo + uses: actions/checkout@v3 + + - name: Configure Python version + uses: actions/setup-python@v4 + with: + python-version: "3.7" + architecture: x64 + + - name: Validate website/meta/universe.json + run: | + python .github/validate_universe_json.py website/meta/universe.json