From 23803eaf794cebaa444ce537e85eb216493b53b9 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Tue, 21 Oct 2025 15:22:12 +0200 Subject: [PATCH] Run checks on pull requests This includes running the checks again on push to the head branch of an open pull request. --- .github/workflows/schema-tests.yaml | 30 ++++++++++----------- .github/workflows/validate-markdown.yaml | 33 ++++++++++++------------ 2 files changed, 31 insertions(+), 32 deletions(-) diff --git a/.github/workflows/schema-tests.yaml b/.github/workflows/schema-tests.yaml index 6b4d45e..1eca407 100644 --- a/.github/workflows/schema-tests.yaml +++ b/.github/workflows/schema-tests.yaml @@ -8,30 +8,28 @@ name: schema-tests # testcases for the metaschemas # -# run this on push to any branch and creation of pull-requests -on: - push: {} +# run this on pull-requests (creation and updates) and on manual trigger +on: pull_request: {} workflow_dispatch: {} jobs: test: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 # checkout repo content - with: - fetch-depth: 0 + - uses: actions/checkout@v5 # checkout repo content + with: + fetch-depth: 0 - - uses: actions/setup-node@v6 # setup Node.js - with: - node-version: '20.x' + - uses: actions/setup-node@v6 # setup Node.js + with: + node-version: "20.x" - - name: Install dependencies from main - run: | - # git checkout remotes/origin/main -- package.json package-lock.json #TODO: uncomment with subsequent PR - npm ci + - name: Install dependencies from main + run: | + # git checkout remotes/origin/main -- package.json package-lock.json #TODO: uncomment with subsequent PR + npm ci - - name: Run tests - run: npm test + - name: Run tests + run: npm test diff --git a/.github/workflows/validate-markdown.yaml b/.github/workflows/validate-markdown.yaml index 5372c6e..7620f72 100644 --- a/.github/workflows/validate-markdown.yaml +++ b/.github/workflows/validate-markdown.yaml @@ -7,25 +7,26 @@ name: validate-markdown # This workflow validates markdown files in the versions directory matching *.md # -# run this on push to any branch and creation of pull-requests -on: [push, pull_request] +# run this on pull-requests (creation and updates) and on manual trigger +on: + pull_request: {} + workflow_dispatch: {} jobs: mdv: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 # checkout repo content - with: - fetch-depth: 0 - # - name: use the javascript environment from main - # run: | - # git checkout remotes/origin/main -- package.json package-lock.json .markdownlint.yaml - - uses: actions/setup-node@v6 # setup Node.js - with: - node-version: '20.x' - - name: Validate markdown - run: npx --yes mdv versions/*.md - - name: Lint markdown - run: npx --yes markdownlint-cli --config .markdownlint.yaml versions/*.md + - uses: actions/checkout@v5 # checkout repo content + with: + fetch-depth: 0 + # - name: use the javascript environment from main + # run: | + # git checkout remotes/origin/main -- package.json package-lock.json .markdownlint.yaml + - uses: actions/setup-node@v6 # setup Node.js + with: + node-version: "20.x" + - name: Validate markdown + run: npx --yes mdv versions/*.md + - name: Lint markdown + run: npx --yes markdownlint-cli --config .markdownlint.yaml versions/*.md