chore(deps): bump web-vitals from 2.1.4 to 4.2.4 in /src/client #279
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.10', '3.11', '3.12', '3.13'] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
version: "0.5.*" | |
- name: Set up Python ${{ matrix.python-version }} | |
run: uv python install ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
uv sync | |
- name: run pre-commit | |
if: ${{ matrix.python-version == env.LATEST_PY_VERSION }} | |
run: | | |
uv run pre-commit run --all-files | |
- name: Run tests | |
run: uv run pytest | |
check-client-changes: | |
runs-on: ubuntu-latest | |
outputs: | |
changes: ${{ steps.client_changes.outputs.changes }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Check for changes in client directory | |
id: client_changes | |
run: | | |
if git diff --quiet HEAD^ HEAD -- src/client yarn.lock; then | |
echo "changes=false" >> $GITHUB_OUTPUT | |
else | |
echo "changes=true" >> $GITHUB_OUTPUT | |
fi | |
build-client: | |
needs: [check-client-changes] | |
runs-on: ubuntu-latest | |
if: needs.check-client-changes.outputs.changes == 'true' | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Cache Node.js dependencies | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: node-modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
node-modules-${{ runner.os }}- | |
- name: Cache Yarn dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
node_modules | |
.yarn | |
key: yarn-cache-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
restore-keys: | | |
yarn-cache-${{ runner.os }}- | |
- name: Install dependencies | |
run: yarn install | |
- name: Build client application | |
run: yarn build | |
publish: | |
needs: [test] | |
runs-on: ubuntu-latest | |
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' | |
environment: | |
name: pypi | |
url: https://pypi.org/p/federated-collection-discovery | |
permissions: | |
id-token: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
version: "0.5.*" | |
- name: Set up Python 3.12 | |
run: uv python install 3.12 | |
- name: Set tag version | |
id: tag | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Set module version | |
working-directory: src/server | |
id: module | |
run: echo "version=$(python federated_collection_discovery/__init__.py)" >> $GITHUB_ENV | |
- name: Build package | |
if: env.tag == env.version | |
run: | | |
uv build | |
- name: Publish to pypi | |
if: env.tag == env.version | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: dist/ |