Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ description: Install dependencies and bundle the action
runs:
using: 'composite'
steps:
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: '24'
cache: 'npm'

- run: npm ci
shell: bash
- uses: ./.github/actions/setup

- run: npm run build
shell: bash
13 changes: 13 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Setup
description: Install Node.js and the project's npm dependencies

runs:
using: 'composite'
steps:
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '24'
cache: 'npm'

- run: npm ci
shell: bash
7 changes: 1 addition & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,7 @@ jobs:
with:
token: ${{ steps.app-token.outputs.token }}

- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '24'
cache: 'npm'

- run: npm ci
- uses: ./.github/actions/setup

- run: npm run typecheck

Expand Down
83 changes: 18 additions & 65 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '24'
cache: 'npm'

- run: npm ci
- uses: ./.github/actions/setup

- run: npm run typecheck

Expand Down Expand Up @@ -64,10 +59,22 @@ jobs:
path: dist/

integration:
# Check names are "integration (project)" and "integration (workspace)" — both are
# required status checks on main, so keep these names in sync with branch protection.
name: integration (${{ matrix.name }})
needs: build
runs-on: macos-15
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- name: project
project_file: tests/fixtures/TestApp/TestApp.xcodeproj
- name: workspace
workspace_file: tests/fixtures/TestWorkspce/TestWorkspace.xcworkspace
scheme: TestWorkspce
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

Expand All @@ -76,63 +83,14 @@ jobs:
name: dist
path: dist/

# Inputs a variant does not define expand to '', which the action treats as unset.
- name: Run action
id: resolve
uses: ./
with:
project_file: tests/fixtures/TestApp/TestApp.xcodeproj

- name: Verify outputs
env:
DEPENDENCIES_CHANGED: ${{ steps.resolve.outputs.dependenciesChanged }}
SUMMARY: ${{ steps.resolve.outputs.summary }}
run: |
echo "dependenciesChanged=${DEPENDENCIES_CHANGED}"
echo "summary=${SUMMARY}"
if [ "${DEPENDENCIES_CHANGED}" != "true" ]; then
echo "::error::Expected dependenciesChanged to be 'true', got '${DEPENDENCIES_CHANGED}'"
exit 1
fi
if [ -z "${SUMMARY}" ]; then
echo "::error::Expected summary to be non-empty"
exit 1
fi

- name: Verify repo is clean except Package.resolved
run: |
CHANGED=$(git diff --name-only)
echo "Changed files: ${CHANGED}"
UNEXPECTED=$(echo "${CHANGED}" | grep -v -e 'Package.resolved' -e '^dist/' || true)
if [ -n "${UNEXPECTED}" ]; then
echo "::error::Unexpected changed files after action: ${UNEXPECTED}"
exit 1
fi
UNTRACKED=$(git ls-files --others --exclude-standard)
echo "Untracked files: ${UNTRACKED}"
if [ -n "${UNTRACKED}" ]; then
echo "::error::Unexpected untracked files after action: ${UNTRACKED}"
exit 1
fi

integration-workspace:
needs: build
runs-on: macos-15
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: dist
path: dist/

- name: Run action with workspace
id: resolve
uses: ./
with:
workspace_file: tests/fixtures/TestWorkspce/TestWorkspace.xcworkspace
scheme: TestWorkspce
project_file: ${{ matrix.project_file }}
workspace_file: ${{ matrix.workspace_file }}
scheme: ${{ matrix.scheme }}

- name: Verify outputs
env:
Expand Down Expand Up @@ -173,12 +131,7 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '24'
cache: 'npm'

- run: npm ci
- uses: ./.github/actions/setup

- run: npm run lint

Expand Down
Loading