Skip to content

Commit

Permalink
Fix github workflows, prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlancollins committed Feb 17, 2024
1 parent ec5bef4 commit 1b86a60
Show file tree
Hide file tree
Showing 43 changed files with 145 additions and 108 deletions.
49 changes: 30 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,53 @@
name: ci

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

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

env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
on:
push:
branches:
- 'main'
- 'beta'

jobs:
test-and-publish:
name: 'Test & Publish'
name: Test & Publish
if: github.repository == 'TanStack/virtual'
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Setup Pnpm
uses: pnpm/action-setup@v2.2.4
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 7
version: 8
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16.19.0
cache: 'pnpm'
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: pnpm --filter "./packages/**" --prefer-offline install --no-frozen-lockfile
- name: Publish
run: pnpm install --frozen-lockfile --prefer-offline
- name: Run Tests
run: pnpm run test:ci
- name: Publish
run: |
git config --global user.name 'Tanner Linsley'
git config --global user.email '[email protected]'
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
pnpm cipublish
pnpm run cipublish
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
TAG: ${{ inputs.tag }}
45 changes: 30 additions & 15 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,42 @@
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:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

jobs:
test:
name: 'Test'
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Setup Pnpm
uses: pnpm/action-setup@v2.2.4
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 7
version: 8
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16.19.0
cache: 'pnpm'
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: pnpm --filter "./packages/**" --prefer-offline install --no-frozen-lockfile
- name: Build & Test
run: npx nx run-many --targets=test,build --projects=@tanstack/* --exclude=@tanstack/react-start
run: pnpm install --frozen-lockfile --prefer-offline
- name: Get base and head commits for `nx affected`
uses: nrwl/nx-set-shas@v3
with:
main-branch-name: 'main'
- name: Run Checks
run: pnpm run test:pr
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ coverage
.env.test.local
.env.production.local
.next
.nx/cache
.pnpm-store

npm-debug.log*
yarn-debug.log*
Expand All @@ -39,6 +37,9 @@ stats.html

*.log
.DS_Store
node_modules
.cache
dist
.nx/cache
.pnpm-store

vite.config.js.timestamp-*
vite.config.ts.timestamp-*
4 changes: 4 additions & 0 deletions .nx/workflows/dynamic-changesets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
distribute-on:
small-changeset: 8 linux-medium-js
medium-changeset: 10 linux-medium-js
large-changeset: 12 linux-medium-js
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
**/.next
**/.nx/cache
**/.svelte-kit
**/build
**/coverage
**/dist
**/docs
**/codemods/**/__testfixtures__
pnpm-lock.yaml
2 changes: 1 addition & 1 deletion examples/react/dynamic/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/react/dynamic/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()]
plugins: [react()],
})
2 changes: 1 addition & 1 deletion examples/react/fixed/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
4 changes: 2 additions & 2 deletions examples/react/fixed/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ function GridVirtualizerFixed() {
? 'ListItemOdd'
: 'ListItemEven'
: virtualRow.index % 2
? 'ListItemOdd'
: 'ListItemEven'
? 'ListItemOdd'
: 'ListItemEven'
}
style={{
position: 'absolute',
Expand Down
2 changes: 1 addition & 1 deletion examples/react/infinite-scroll/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/react/padding/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
4 changes: 2 additions & 2 deletions examples/react/padding/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ function GridVirtualizerDynamic({ rows, columns }) {
? 'ListItemOdd'
: 'ListItemEven'
: virtualRow.index % 2
? 'ListItemOdd'
: 'ListItemEven'
? 'ListItemOdd'
: 'ListItemEven'
}
style={{
position: 'absolute',
Expand Down
2 changes: 1 addition & 1 deletion examples/react/scroll-padding/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/react/smooth-scroll/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/react/sticky/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/react/table/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/react/table/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()]
plugins: [react()],
})
2 changes: 1 addition & 1 deletion examples/react/variable/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
4 changes: 2 additions & 2 deletions examples/react/variable/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ function GridVirtualizerVariable({ rows, columns }) {
? 'ListItemOdd'
: 'ListItemEven'
: virtualRow.index % 2
? 'ListItemOdd'
: 'ListItemEven'
? 'ListItemOdd'
: 'ListItemEven'
}
style={{
position: 'absolute',
Expand Down
2 changes: 1 addition & 1 deletion examples/react/window/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/svelte/dynamic/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/svelte/fixed/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/svelte/infinite-scroll/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/svelte/smooth-scroll/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/svelte/sticky/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/svelte/table/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/dynamic/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/fixed/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
4 changes: 2 additions & 2 deletions examples/vue/fixed/src/components/GridVirtualizerFixed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
? 'ListItemOdd'
: 'ListItemEven'
: virtualRow.index % 2
? 'ListItemOdd'
: 'ListItemEven'
? 'ListItemOdd'
: 'ListItemEven'
"
:style="{
position: 'absolute',
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/infinite-scroll/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/padding/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
? 'ListItemOdd'
: 'ListItemEven'
: virtualRow.index % 2
? 'ListItemOdd'
: 'ListItemEven'
? 'ListItemOdd'
: 'ListItemEven'
"
:style="{
position: 'absolute',
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/scroll-padding/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/smooth-scroll/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/sticky/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/table/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/table/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ body {

.text-left {
text-align: left;
}
}
2 changes: 1 addition & 1 deletion examples/vue/variable/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
Loading

0 comments on commit 1b86a60

Please sign in to comment.