Skip to content

Commit

Permalink
chore(pipeline): add turborepo with github caching
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramon92 committed Feb 2, 2024
1 parent f7fcf29 commit 57db231
Show file tree
Hide file tree
Showing 7 changed files with 138 additions and 15 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/verify-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ jobs:
- name: Build specific packages for production
run: npm run build:production

- name: Cache turbo build setup
uses: actions/cache@v3
with:
path: '**/**/.turbo'
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Test
run: npm run test:node

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ local.log
docs/_merged_data/
docs/_merged_assets/
docs/_merged_includes/

.turbo
4 changes: 0 additions & 4 deletions integration/test-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
"author": "modern-web",
"homepage": "https://github.com/modernweb-dev/web/tree/master/packages/test-runner-integration-tests",
"main": "index.js",
"scripts": {
"test": "mocha test/**/*.test.ts --require ts-node/register --reporter dot",
"test:watch": "mocha test/**/*.test.ts --require ts-node/register --watch --watch-files src,test --reporter dot"
},
"dependencies": {
"@web/dev-server-legacy": "^2.1.0",
"@web/test-runner-core": "^0.13.0"
Expand Down
106 changes: 101 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"start:build": "node packages/dev-server/dist/bin.js --root-dir _site --open",
"test": "npm run test:node && npm run test:browser",
"test:browser": "npm run test:browser --workspaces --if-present",
"test:node": "npm run test:node --workspaces --if-present",
"test:node": "turbo run test:node",
"types": "wireit",
"update": "npm run update:mjs-dts-entrypoints && npm run update:tsconfigs",
"update-dependency": "node scripts/update-dependency.js",
Expand Down Expand Up @@ -74,6 +74,7 @@
"rimraf": "^4.4.1",
"rollup": "^4.4.0",
"ts-node": "^10.4.0",
"turbo": "^1.12.2",
"typescript": "~5.0.4",
"wireit": "^0.10.0"
},
Expand Down
5 changes: 0 additions & 5 deletions packages/test-runner-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
"engines": {
"node": ">=18.0.0"
},
"scripts": {
"build": "tsc",
"test": "mocha \"test/**/*.test.ts\" --require ts-node/register --reporter dot",
"test:watch": "mocha \"test/**/*.test.ts\" --require ts-node/register --watch --watch-files src,test --reporter dot"
},
"files": [
"*.d.ts",
"*.js",
Expand Down
26 changes: 26 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**", "tsconfig.tsbuildinfo"]
},
"test:node": {
"dependsOn": ["build"],
"inputs": [
"src/**/*.js",
"src/**/*.main",
"src/**/*.ts",
"**/*.test.ts",
"**/*.test.js",
"**/*.test.mjs"
]
},

"lint": {},
"dev": {
"cache": false,
"persistent": true
}
}
}

0 comments on commit 57db231

Please sign in to comment.