Skip to content

Commit

Permalink
chore: Update CI versions of node and pnpm (#538)
Browse files Browse the repository at this point in the history
* Update node and pnpm for CI

* Update concurrency and run conditions
  • Loading branch information
lachlancollins authored Dec 30, 2023
1 parent 250a7fe commit b7569a8
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 38 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
name: ci
concurrency:
group: publish-${{ github.github.base_ref }}
cancel-in-progress: true

on:
workflow_dispatch:
inputs:
tag:
description: override release tag
required: false
push:
branches:
- 'main'
- 'alpha'
- 'beta'
branches: ['main', 'alpha', 'beta']

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

env:
NX_DAEMON: false
NX_VERBOSE_LOGGING: true
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

jobs:
test-and-publish:
if: github.repository == 'TanStack/form' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta')
name: 'Test & Publish'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- uses: pnpm/[email protected]
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.15.0
registry-url: https://registry.npmjs.org/
node-version-file: .nvmrc
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
Expand Down
72 changes: 47 additions & 25 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,39 @@
name: pr
on: [pull_request]

on:
pull_request:
paths-ignore:
- 'docs/**'
- 'media/**'
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

env:
NX_DAEMON: false
NX_VERBOSE_LOGGING: true
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

jobs:
test:
name: 'Test'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: pnpm/[email protected]
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.15.0
node-version-file: .nvmrc
cache: 'pnpm'
- name: Install dependencies
run: pnpm --prefer-offline install --no-frozen-lockfile
Expand All @@ -35,17 +49,19 @@ jobs:
name: 'Lint'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: pnpm/[email protected]
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 7
- uses: actions/setup-node@v3
version: 8
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16.14.2
node-version-file: .nvmrc
cache: 'pnpm'
- name: Install dependencies
run: pnpm --prefer-offline install --no-frozen-lockfile
Expand All @@ -54,17 +70,19 @@ jobs:
name: 'Typecheck'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: pnpm/[email protected]
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 7
- uses: actions/setup-node@v3
version: 8
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16.14.2
node-version-file: .nvmrc
cache: 'pnpm'
- name: Install dependencies
run: pnpm --prefer-offline install --no-frozen-lockfile
Expand All @@ -73,17 +91,19 @@ jobs:
name: 'Format'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: pnpm/[email protected]
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 7
- uses: actions/setup-node@v3
version: 8
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16.14.2
node-version-file: .nvmrc
cache: 'pnpm'
- name: Install dependencies
run: pnpm --prefer-offline install --no-frozen-lockfile
Expand All @@ -92,17 +112,19 @@ jobs:
name: 'Test Build'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: pnpm/[email protected]
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 7
- uses: actions/setup-node@v3
version: 8
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16.14.2
node-version-file: .nvmrc
cache: 'pnpm'
- name: Install dependencies
run: pnpm --prefer-offline install --no-frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.19.0
v18.19.0

0 comments on commit b7569a8

Please sign in to comment.