Skip to content

Commit

Permalink
Merge pull request #16 from shopware/next-33446/tidy-up-ci
Browse files Browse the repository at this point in the history
NEXT-33446 - tidy up ci
  • Loading branch information
Haberkamp authored Feb 15, 2024
2 parents 24d73cf + 7d3a73f commit ab858ce
Show file tree
Hide file tree
Showing 19 changed files with 263 additions and 216 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/chromatic.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/deploy-developer-portal.yml

This file was deleted.

8 changes: 6 additions & 2 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
paths:
- 'packages/component-library/**'

jobs:
create-storybook-pages:
Expand All @@ -20,12 +22,14 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline

- name: Create the static pages directory locally in CI
run: pnpm --prefix ./packages/component-library run build-storybook
- name: Build storybook
run: pnpx turbo run build:storybook --filter=@shopware-ag/meteor-component-library

- name: Deploy 🚀
uses: JamesIves/[email protected]
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/developer-portal-healthckeck.yml

This file was deleted.

9 changes: 6 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Docs

on: push
on:
push:
branches:
- main

jobs:
create-docs-icon-kit:
Expand All @@ -10,7 +13,6 @@ jobs:
uses: actions/checkout@v4

- name: Deploy redirect
if: github.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
with:
branch: gh-pages
Expand All @@ -31,6 +33,8 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline
Expand All @@ -45,7 +49,6 @@ jobs:
pnpm run doc
- name: Deploy 🚀
if: github.ref == 'refs/heads/trunk'
uses: JamesIves/[email protected]
with:
branch: gh-pages
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
name: Deploy PR previews

on:
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
branches:
- main
paths:
- 'packages/component-library/**'

concurrency: preview-${{ github.ref }}

jobs:
deploy-preview:
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- name: Checkout the repository
uses: actions/checkout@v4
Expand All @@ -25,12 +27,14 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Install main dependencies
run: pnpm install --frozen-lockfile --prefer-offline

- name: Create the static pages directory locally in CI
run: pnpm --prefix ./packages/component-library run build-storybook
- name: Build storybook
run: pnpx turbo run build:storybook --filter=@shopware-ag/meteor-component-library

- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Install dependencies
run: pnpm i
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,20 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Install dependencies
run: pnpm i

- name: Check formatting
run: pnpm run format:check
run: pnpx turbo run format:check

- name: Perform typecheck
run: pnpm run lint:types
run: pnpx turbo run lint:types

- name: Lint code
run: pnpm run lint:eslint
run: pnpx turbo run lint:eslint

unit-tests:
name: Unit tests
Expand All @@ -59,12 +61,14 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline

- name: unit
run: pnpm run test:unit
run: pnpx turbo run test:unit

circular-dependencies:
name: Check for circular dependencies (Madge)
Expand All @@ -84,6 +88,8 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline
Expand All @@ -99,6 +105,9 @@ jobs:
- circular-dependencies
- unit-tests
- static-analysis
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -111,6 +120,8 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline
Expand All @@ -119,7 +130,7 @@ jobs:
run: npx playwright install

- name: Run Playwright tests
run: pnpm --filter @shopware-ag/meteor-admin-sdk run test:e2e
run: pnpx turbo run test:e2e --filter @shopware-ag/meteor-admin-sdk

- uses: actions/upload-artifact@v2
if: always()
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/update-healthcheck.yml

This file was deleted.

6 changes: 4 additions & 2 deletions .github/workflows/update-icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,17 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline

- name: Build
run: pnpm --prefix ./packages/icon-kit run build
run: pnpm --filter @shopware-ag/meteor-component-library run build

- name: Update icons
run: pnpm --prefix ./packages/icon-kit run start
run: pnpm --filter @shopware-ag/meteor-component-library run start

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/visual-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
paths:
- 'packages/component-library/**'

workflow_dispatch:

Expand All @@ -27,23 +29,23 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline

- name: Install Playwright
run: pnpm dlx playwright install

- name: Create the static pages directory locally in CI
run: pnpm --prefix ./packages/component-library run build-storybook
- name: Build storybook
run: pnpx turbo run build:storybook --filter=@shopware-ag/meteor-component-library

- name: Run Tests
id: storybookTests
run: |
cd ./packages/component-library &&
npx concurrently --kill-others --success first --names "SB,TEST" --prefix-colors "magenta,blue" \
"http-server storybook-static -a 127.0.0.1 --port 6006" \
"wait-on http://127.0.0.1:6006 && pnpm run test-storybook"
"pnpm --filter @shopware-ag/meteor-component-library run start:storybook" \
"wait-on http://127.0.0.1:6006 && pnpx turbo run test:storybook --filter=@shopware-ag/meteor-component-library"
- name: Archive visual test diffs
uses: actions/upload-artifact@v3
Expand Down
11 changes: 1 addition & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@
"version": "0.0.0",
"private": true,
"description": "The monorepo that contains all Meteor related projects",
"scripts": {
"build": "turbo run build",
"lint:all": "turbo run lint:all",
"lint:types": "turbo run lint:types",
"lint:eslint": "turbo run lint:eslint",
"format": "turbo run format",
"format:check": "turbo run format:check",
"test:unit": "turbo run test:unit",
"test:e2e": "turbo run test:e2e"
},
"scripts": {},
"keywords": [],
"license": "MIT",
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/admin-sdk/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# meteor-admin-sdk
# meteor-admin-sdk
[![Tests](https://github.com/shopware/meteor-admin-sdk/actions/workflows/tests.yml/badge.svg)](https://github.com/shopware/meteor-admin-sdk/actions/workflows/tests.yml)
[![NPM Package](https://img.shields.io/npm/v/@shopware-ag/meteor-admin-sdk)](https://www.npmjs.com/package/@shopware-ag/meteor-admin-sdk)

Expand Down
Loading

0 comments on commit ab858ce

Please sign in to comment.