Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
41 changes: 40 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,50 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Install Chrome for headless testing
run: pnpm -r --if-present test:install-deps
run: pnpm test:install-deps
- name: Run tests
run: pnpm test:unit
- name: Collect coverage
uses: codecov/codecov-action@v6
if: success()
with:
token: ${{ secrets.CODECOV_TOKEN }}
integration:
runs-on: ubuntu-latest
name: integration
steps:
- name: Checkout the repository
uses: actions/checkout@v6
- name: Install pnpm
uses: pnpm/action-setup@v6
with:
version: 10
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Install Chrome for headless testing
run: pnpm test:install-deps
- name: Restore integration test cache
uses: actions/cache/restore@v4
with:
path: examples/**/common/test/integration-test-cache.json
key: integration-test-cache-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: |
integration-test-cache-${{ runner.os }}-
- name: Run tests
run: |
for attempt in 1 2 3; do
pnpm examples:test && exit 0
echo "Integration tests failed on attempt ${attempt}"
done
exit 1
- name: Save integration test cache
uses: actions/cache/save@v4
if: success()
with:
path: examples/**/common/test/integration-test-cache.json
key: integration-test-cache-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ node_modules
# Some caches
.*cache
.trash
tsconfig.tsbuildinfo
*.tsbuildinfo
integration-test-cache.json

# Compiled dist
dist
Expand Down
22 changes: 22 additions & 0 deletions examples/common/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import bundlerConfig from '@trigen/eslint-config/bundler'
import tsConfig from '@trigen/eslint-config/typescript'
import env from '@trigen/eslint-config/env'
import rootConfig from '../../eslint.config.js'

export default [
...rootConfig,
...bundlerConfig,
...tsConfig,
env.node,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname
}
},
rules: {
'import/no-default-export': 'off'
}
}
]
12 changes: 12 additions & 0 deletions examples/common/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "examples-common",
"private": true,
"version": "0.0.0",
"type": "module",
"devDependencies": {
"@types/node": "catalog:",
"playwright": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:"
}
}
Loading
Loading