Skip to content

Generate published API entry point from src/api.ts #438

Generate published API entry point from src/api.ts

Generate published API entry point from src/api.ts #438

Workflow file for this run

name: PR files
on:
pull_request:
types:
- 'opened'
- 'reopened'
- 'synchronize'
- 'labeled'
- 'unlabeled'
permissions: {}
jobs:
changed-files-in-pr:
name: 'Check for changed files'
runs-on: ubuntu-latest
steps:
- name: 'package-lock.json matches package.json'
uses: brettcannon/check-for-changed-files@871d7b8b5917a4f6f06662e2262e8ffc51dff6d1 # v1.2.1
with:
prereq-pattern: 'package.json'
file-pattern: 'package-lock.json'
skip-label: 'skip package*.json'
failure-message: '${prereq-pattern} was edited but ${file-pattern} was not (the ${skip-label} label can be used to pass this check)'
- name: 'package.json matches package-lock.json'
uses: brettcannon/check-for-changed-files@871d7b8b5917a4f6f06662e2262e8ffc51dff6d1 # v1.2.1
with:
prereq-pattern: 'package-lock.json'
file-pattern: 'package.json'
skip-label: 'skip package*.json'
failure-message: '${prereq-pattern} was edited but ${file-pattern} was not (the ${skip-label} label can be used to pass this check)'
- name: 'Tests'
uses: brettcannon/check-for-changed-files@871d7b8b5917a4f6f06662e2262e8ffc51dff6d1 # v1.2.1
with:
prereq-pattern: src/**/*.ts
file-pattern: |
src/**/*.test.ts
src/**/*.unit.test.ts
skip-label: 'skip tests'
failure-message: 'TypeScript code was edited without also editing a test file (the ${skip-label} label can be used to pass this check)'
- name: 'Public API changes require a version bump'
uses: brettcannon/check-for-changed-files@871d7b8b5917a4f6f06662e2262e8ffc51dff6d1 # v1.2.1
with:
prereq-pattern: 'src/api.ts'
file-pattern: 'api/package.json'
skip-label: 'skip api version'
failure-message: 'The public API (${prereq-pattern}) was changed without bumping the package version in ${file-pattern} (the ${skip-label} label can be used to pass this check)'
- name: 'Public API changes require a changelog entry'
uses: brettcannon/check-for-changed-files@871d7b8b5917a4f6f06662e2262e8ffc51dff6d1 # v1.2.1
with:
prereq-pattern: 'src/api.ts'
file-pattern: 'api/CHANGELOG.md'
skip-label: 'skip api changelog'
failure-message: 'The public API (${prereq-pattern}) was changed without a changelog entry in ${file-pattern} (the ${skip-label} label can be used to pass this check)'
version-match:
name: 'Extension and API package versions match'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: 'Compare package.json versions'
run: python scripts/compare_package_versions.py