fix(deps): update all non-major dependencies #1463
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: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
merge_group: | |
pull_request: | |
paths-ignore: | |
- ".vscode/**" | |
- "**/*.md" | |
- ".github/ISSUE_TEMPLATE/**" | |
# Automatically cancel older in-progress jobs on the same branch | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
FORCE_COLOR: true | |
ASTRO_TELEMETRY_DISABLED: true | |
# 7 GiB by default on GitHub, setting to 6 GiB | |
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources | |
NODE_OPTIONS: --max-old-space-size=6144 | |
jobs: | |
# Build primes out Turbo build cache and pnpm cache | |
build: | |
name: "Build: ${{ matrix.os }}" | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 3 | |
strategy: | |
matrix: | |
OS: [ubuntu-latest, windows-latest] | |
NODE_VERSION: [20] | |
fail-fast: true | |
steps: | |
# Disable crlf so all OS can share the same Turbo cache | |
# https://github.com/actions/checkout/issues/135 | |
- name: Disable git crlf | |
run: git config --global core.autocrlf false | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v3 | |
- name: Setup node@${{ matrix.NODE_VERSION }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.NODE_VERSION }} | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
# Only build in ubuntu as windows can share the build cache. | |
# Also only build in core repo as forks don't have access to the Turbo cache. | |
- name: Build Packages | |
if: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'withastro' }} | |
run: pnpm run build | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
needs: build | |
permissions: | |
contents: read | |
pull-requests: write | |
steps: | |
- name: Disable git crlf | |
run: git config --global core.autocrlf false | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build Packages | |
run: pnpm run build | |
- name: CI checks (format and linting) | |
run: pnpm run ci | |
test: | |
name: "Test: ${{ matrix.os }} (node@${{ matrix.NODE_VERSION }})" | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 25 | |
needs: build | |
strategy: | |
matrix: | |
OS: [ubuntu-latest] | |
NODE_VERSION: [18, 20] | |
include: | |
- os: macos-latest | |
NODE_VERSION: 18 | |
- os: windows-latest | |
NODE_VERSION: 18 | |
fail-fast: false | |
env: | |
NODE_VERSION: ${{ matrix.NODE_VERSION }} | |
steps: | |
- name: Disable git crlf | |
run: git config --global core.autocrlf false | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v3 | |
- name: Setup node@${{ matrix.NODE_VERSION }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.NODE_VERSION }} | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build Packages | |
run: pnpm run build | |
- name: Test | |
run: pnpm run test |