Files
pnpm/.github/workflows/ci.yml
dependabot[bot] 28daa2cb2e build(deps): bump the github-actions group across 1 directory with 4 updates (#10833)
Bumps the github-actions group with 4 updates in the / directory: [actions/upload-artifact](https://github.com/actions/upload-artifact), [actions/download-artifact](https://github.com/actions/download-artifact), [github/codeql-action](https://github.com/github/codeql-action) and [cbrgm/mastodon-github-action](https://github.com/cbrgm/mastodon-github-action).


Updates `actions/upload-artifact` from 6.0.0 to 7.0.0
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](b7c566a772...bbbca2ddaa)

Updates `actions/download-artifact` from 7.0.0 to 8.0.0
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](37930b1c2a...70fc10c6e5)

Updates `github/codeql-action` from 4.31.11 to 4.32.5
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](19b2f06db2...c793b717bc)

Updates `cbrgm/mastodon-github-action` from 2.1.23 to 2.1.26
- [Release notes](https://github.com/cbrgm/mastodon-github-action/releases)
- [Commits](3ebdc72dcd...fc8b40e2ec)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/download-artifact
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-version: 4.32.5
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: cbrgm/mastodon-github-action
  dependency-version: 2.1.26
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 23:53:39 +01:00

118 lines
4.4 KiB
YAML

name: CI
on: [push, pull_request]
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
compile-and-lint:
# Skip pull_request events from PRs in the same repo. This prevents
# duplicate build jobs from running when creating a PR in the original repo.
# Exception: chore/update-lockfile PRs (created by automation with GITHUB_TOKEN, which doesn't trigger push events)
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository || github.head_ref == 'chore/update-lockfile' }}
name: Compile & Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
standalone: true
- name: Setup Node
run: pnpm env use -g 24.6.0
timeout-minutes: 1
- name: pnpm install
run: pnpm install
timeout-minutes: 3
- name: Compile TypeScript
run: pnpm run compile-only
- name: Lint
run: pnpm run lint
- name: Package compiled artifacts
run: tar -czf compiled.tar.gz --exclude='node_modules' $(find . -type d -name lib -not -path '*/node_modules/*') $(find . -name 'tsconfig.tsbuildinfo' -not -path '*/node_modules/*') pnpm/dist
- name: Upload compiled artifacts
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: compiled-packages
path: compiled.tar.gz
retention-days: 1
test:
needs: compile-and-lint
# Skip pull_request events from PRs in the same repo. This prevents
# duplicate test jobs from running when creating a PR in the original repo.
# Exception: chore/update-lockfile PRs (created by automation with GITHUB_TOKEN, which doesn't trigger push events)
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository || github.head_ref == 'chore/update-lockfile' }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.platform }}-${{ matrix.node[0] }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
node:
- [22, 13, 0]
- [24, 0, 0]
- [25, 0, 0]
platform:
- ubuntu-latest
- windows-latest
name: Test ${{matrix.platform}} / Node.js ${{ matrix.node[0] }}
runs-on: ${{matrix.platform}}
steps:
- name: Configure Git
run: |
git config --global core.autocrlf false
git config --global user.name "xyz"
git config --global user.email "x@y.z"
- name: Checkout Commit
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
standalone: false
- name: Setup Node
run: pnpm env use -g ${{ join(matrix.node, '.') }}
timeout-minutes: 1
# npm is needed for preparing git-hosted dependencies (e.g. in dlx tests)
- name: Verify npm
run: npm --version
- name: pnpm install
run: pnpm install
timeout-minutes: 3
- name: Download compiled artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
name: compiled-packages
- name: Extract compiled artifacts
run: tar -xzf compiled.tar.gz
- name: Determine test scope
id: test-scope
shell: bash
run: |
if [[ "${{ github.ref_name }}" == "main" || "${{ github.ref_name }}" == "chore/update-lockfile" ]]; then
echo "script=ci:test-all" >> "$GITHUB_OUTPUT"
echo "scope=all" >> "$GITHUB_OUTPUT"
else
git remote set-branches --add origin main && git fetch origin main --depth=1
if [ -n "$(git diff --name-only origin/main HEAD -- pnpm-workspace.yaml)" ]; then
echo "script=ci:test-all" >> "$GITHUB_OUTPUT"
echo "scope=all — pnpm-workspace.yaml modified" >> "$GITHUB_OUTPUT"
else
echo "script=ci:test-branch" >> "$GITHUB_OUTPUT"
echo "scope=affected packages" >> "$GITHUB_OUTPUT"
fi
fi
- name: Run tests (${{ steps.test-scope.outputs.scope }})
timeout-minutes: 70
run: pnpm run ${{ steps.test-scope.outputs.script }}
env:
PNPM_WORKERS: 3