Skip to content

Commit

Permalink
ci(shared): enable github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sdorra committed Mar 26, 2024
1 parent 53e6440 commit 0435a01
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 5 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize]

jobs:
build:
name: Build and Test
timeout-minutes: 15
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}

steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2

- uses: pnpm/action-setup@v3
with:
version: 8

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Build cli
run: pnpm build --filter=cli

- name: Install cli binary
run: pnpm install

- name: Build
run: pnpm build

- name: Install Playwright Browsers
run: pnpx playwright install --with-deps

- name: Test
run: pnpm test
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"author": "Sebastian Sdorra <[email protected]>",
"license": "MIT",
"scripts": {
"commitlint": "commitlint --edit"
"commitlint": "commitlint --edit",
"build": "turbo build",
"test": "turbo test"
},
"devDependencies": {
"@changesets/changelog-github": "^0.5.0",
Expand Down
11 changes: 7 additions & 4 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@
"dependsOn": ["^build"],
"outputs": ["dist/**", ".content-collections/**"]
},
"typecheck": {
"dependsOn": ["^build"]
},
"lint": {
"dependsOn": ["^build"]
},
"test": {
"dependsOn": ["build", "typecheck", "lint"]
"dependsOn": ["^build"]
},
"typecheck": {
"dependsOn": ["^build", "^test"]
},
"check": {
"dependsOn": ["^test", "^lint"]
},
"dev": {
"dependsOn": ["^build"],
Expand Down

0 comments on commit 0435a01

Please sign in to comment.