Diffinery

codician/diffinerypublic

Open-source, agent-first GitHub and GitHub Actions alternative that runs on your own Cloudflare account: git hosting, pull requests, code review and drop-in GitHub Actions YAML on Workers, Durable Objects, R2 and Containers.

56 lines · 1.8 KBRaw History
1name: End-to-end
2
3on:
4 push:
5 branches: [main]
6 pull_request:
7
8permissions:
9 contents: read
10
11concurrency:
12 group: e2e-${{ github.ref }}
13 cancel-in-progress: true
14
15jobs:
16 # The suite in two parallel shards of about the same length: the git, pull request
17 # and Actions file on its own, and every other test/e2e/*.test.mjs file (so a new
18 # file runs without editing this). Only the second shard needs a browser (passkeys).
19 e2e:
20 name: End-to-end (${{ matrix.name }})
21 runs-on: ubuntu-latest
22 timeout-minutes: 20
23 strategy:
24 fail-fast: false
25 matrix:
26 include:
27 - name: git, PRs, Actions
28 shard: core
29 - name: agent reviews, tasks, Today
30 shard: agents
31 - name: passkeys, registry, email, security
32 shard: rest
33 steps:
34 - uses: actions/checkout@v4
35 - uses: pnpm/action-setup@v4
36 - uses: actions/setup-node@v4
37 with:
38 node-version: 22
39 cache: pnpm
40 - run: pnpm install --frozen-lockfile
41 - run: pnpm -r --if-present build
42 - if: matrix.shard == 'rest'
43 run: pnpm --filter @diffinery/app exec playwright install --with-deps chromium
44 - name: Run the shard's tests
45 working-directory: apps/diffinery
46 run: |
47 # Shards of similar length; a new test file runs in "rest" unless it's added to another.
48 core='/e2e\.test\.mjs$'
49 agents='/(agentic|review|tasks)\.test\.mjs$'
50 case "${{ matrix.shard }}" in
51 core) files=$(ls test/e2e/*.test.mjs | grep -E "$core") ;;
52 agents) files=$(ls test/e2e/*.test.mjs | grep -E "$agents") ;;
53 *) files=$(ls test/e2e/*.test.mjs | grep -vE "$core|$agents") ;;
54 esac
55 echo "$files"
56 node --test --test-concurrency=1 --test-timeout=600000 $files