Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ jobs:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps:
- name: Generate GitHub App Token
id: generate-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Checkout Repo
uses: actions/checkout@v5

Expand All @@ -25,18 +32,11 @@ jobs:
uses: actions/setup-node@v5
with:
node-version: 22
cache: 'pnpm'
cache: "pnpm"

- name: Install Dependencies
run: pnpm install

- name: Generate GitHub App Token
id: generate-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
Expand Down
88 changes: 80 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
cache: "pnpm"

- name: Install dependencies
run: pnpm install
Expand All @@ -48,15 +48,15 @@ jobs:
- id: checkout
name: Checkout
uses: actions/checkout@v5

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Use Node.js 22
uses: actions/setup-node@v5
with:
node-version: 22
cache: 'pnpm'
cache: "pnpm"

- name: Install dependencies
run: pnpm install
Expand All @@ -66,24 +66,24 @@ jobs:

test-build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22, lts/*, latest]

steps:
- id: checkout
name: Checkout
uses: actions/checkout@v5

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
cache: "pnpm"

- name: Install Bun
uses: oven-sh/setup-bun@v2
Expand All @@ -95,3 +95,75 @@ jobs:

- name: Run build
run: pnpm run build

test-e2e:
timeout-minutes: 60
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # for checking against main

- name: Fetch base commit for PRs
if: ${{ github.event_name == 'pull_request' }}
shell: bash
run: |
BASE_SHA='${{ github.event.pull_request.base.sha }}'
BASE_REF='${{ github.event.pull_request.base.ref }}'
BASE_REPO='${{ github.event.pull_request.base.repo.full_name }}'
THIS_REPO='${{ github.repository }}'
if [ "$BASE_REPO" != "$THIS_REPO" ]; then
git remote add upstream '${{ github.event.pull_request.base.repo.clone_url }}'
# Fetch the exact base SHA to avoid shallow-history issues
git fetch --no-tags --depth=1 upstream "$BASE_SHA"
else
git fetch --no-tags --depth=1 origin "$BASE_SHA"
fi

# Set Turbo base/head for PRs, see: https://turborepo.com/docs/reference/run#--affected
- name: Set Turbo base/head for PRs
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "TURBO_SCM_BASE=${{ github.event.pull_request.base.sha }}" >> $GITHUB_ENV
echo "TURBO_SCM_HEAD=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Use Node.js 22
uses: actions/setup-node@v5
with:
node-version: 22
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Cache Playwright browsers
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-pw-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pw-

- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps

- name: Run E2E (PR)
if: ${{ github.event_name == 'pull_request' }}
run: pnpm turbo run test:e2e --affected

# Pushes to main - run everything
- name: Run E2E (main)
if: ${{ github.event_name != 'pull_request' }}
run: pnpm turbo run test:e2e

- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: |
**/playwright-report/**
retention-days: 30
24 changes: 16 additions & 8 deletions arkenv.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
"path": ".",
"name": "~"
},
{
"path": "apps/www/content/docs",
"name": "docs"
},
{
"path": "apps/www/public/assets",
"name": "assets"
},
{
"path": "packages",
"name": "packages"
Expand All @@ -16,6 +24,14 @@
"path": "packages/vite-plugin",
"name": " @arkenv/vite-plugin"
},
{
"path": "tooling",
"name": "tooling"
},
{
"path": "tooling/playwright-www",
"name": " playwright-www (arkenv.js.org)"
},
{
"path": "apps",
"name": "apps"
Expand Down Expand Up @@ -47,14 +63,6 @@
{
"path": "examples/with-vite-react-ts",
"name": " with-vite-react-ts"
},
{
"path": "apps/www/content/docs",
"name": "docs"
},
{
"path": "apps/www/public/assets",
"name": "assets"
}
],
"settings": {
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@
"clean": "rimraf dist node_modules",
"test": "vitest",
"test:ui": "vitest --ui",
"test:e2e": "turbo run test:e2e",
"test:e2e:report": "turbo run test:e2e:report",
"test:e2e:ui": "turbo run test:e2e:ui",
"test:e2e:update": "turbo run test:e2e:update",
"changeset": "changeset"
},
"devDependencies": {
"@biomejs/biome": "2.2.5",
"@changesets/cli": "^2.29.7",
"@playwright/test": "^1.56.0",
"@vitest/ui": "^3.2.4",
"changesets-changelog-clean": "^1.3.0",
"rimraf": "^6.0.1",
Expand Down
Loading
Loading