Skip to content

Version Packages

Version Packages #429

Workflow file for this run

# This GitHub Actions workflow runs tests for the `joint` repository.
name: Test PR
# Trigger this workflow on:
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
# Cancel in-progress runs on new commits
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# Job to run tests
test:
if: ${{ github.repository == 'clientIO/joint' }}
runs-on: ubuntu-latest
steps:
# Checkout contents of joint repo
- name: Checkout joint
id: checkout-joint
uses: actions/checkout@v7
with:
fetch-depth: 0
# Install environment packages
# Fonts - util.breakText - international characters
- name: Install environment packages
id: install-environment-packages
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: |
fonts-arphic-ukai \
fonts-arphic-uming \
fonts-ipafont-mincho \
fonts-ipafont-gothic \
fonts-unfonts-core \
fonts-noto-core
version: 1.0
# Set up Node.js version for building
- name: Setup Node.js v22
id: setup-node
uses: actions/setup-node@v7
with:
node-version: 22.14.0
# Cache Yarn packages to speed up CI
- name: Cache Yarn
id: cache-yarn
uses: actions/cache@v6
with:
path: |
.yarn/cache
key: yarn-cache-${{ hashFiles('yarn.lock') }}
# Install all dependencies from the joint repo
- name: Install dependencies
id: install-dependencies
run: yarn install --immutable
# Changing releasable code in a public package must provide a changeset
# (Releasable files are configured in `.changeset/config.json`)
# (Call `yarn changeset add --empty` to opt out of a release)
- name: Check changeset
id: check-changeset
# Release PR is skipped - it consumes all changesets instead
if: ${{ github.event_name == 'pull_request' && !startsWith(github.head_ref, 'changeset-release/') }}
# Compare PR to current committed master
run: |
git fetch --no-tags origin '+refs/heads/master:refs/remotes/origin/master'
yarn changeset status --since=origin/master
# Build the joint project
- name: Prepare joint
id: prepare-joint
run: yarn run dist
# Test the joint project
- name: 'Test joint'
id: test-joint
run: yarn run test
# Lint the joint project
- name: 'Lint joint'
id: lint-joint
run: yarn run lint