Skip to content

Commit

Permalink
Merge pull request #4 from sneg240/SNEGDEV-10
Browse files Browse the repository at this point in the history
feat: SNEGDEV-10 сделал сборку и запуск тестов в github action'ах
  • Loading branch information
lionskape authored Oct 8, 2023
2 parents ccb82f7 + bea2867 commit 7bd1fc1
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 9 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
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: 10 # 👈 Нужно что бы chromatic хорошо работал, пока пробуем глубину истории 10

- uses: pnpm/action-setup@v2

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

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm run build

- name: Lint & Test
run: pnpm run check

- name: Publish to Chromatic
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
workingDir: packages/ui
storybookBuildDir: storybook-static
onlyChanged: true
zip: true
exitOnceUploaded: true
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
10 changes: 5 additions & 5 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"type": "module",
"sideEffect": false,
"scripts": {
"dev": "next dev --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint",
"typecheck": "tsc"
"disabled:dev": "next dev --turbo",
"disabled:build": "next build",
"disabled:start": "next start",
"disabled:lint": "next lint",
"disabled:typecheck": "tsc"
},
"dependencies": {
"@sneg240/tailwind": "workspace:*",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"prettier": "3.0.3",
"turbo": "1.10.15"
},
"repository": "https://github.com/sneg240/frontend",
"packageManager": "[email protected]"
}
1 change: 1 addition & 0 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@sneg240/tailwind": "workspace:*",
"clsx": "2.0.0",
"next": "13.5.4",
"chromatic": "7.2.3",
"tailwindcss": "3.3.3"
},
"devDependencies": {
Expand Down
8 changes: 8 additions & 0 deletions pnpm-lock.yaml

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

5 changes: 1 addition & 4 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"pipeline": {
"build": {
"dependsOn": ["^build"],
"outputs": [".next/**", "!.next/cache/**"]
"outputs": [".next/**", "!.next/cache/**", "storybook-static/**"]
},
"check": {
"dependsOn": ["lint", "typecheck"]
Expand All @@ -14,9 +14,6 @@
"dev": {
"cache": false,
"persistent": true
},
"crawl": {
"cache": false
}
}
}

0 comments on commit 7bd1fc1

Please sign in to comment.