Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: split up jobs into separate pipelines #46

Merged
merged 1 commit into from
Sep 23, 2024
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 1 addition & 24 deletions .github/workflows/CI.yml → .github/workflows/BUILD.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Build

on:
push:
Expand Down Expand Up @@ -36,32 +36,9 @@ jobs:
- name: 🧐 Check Code Quality
run: pnpm lint

# - name: 🎭 Install Playwright
# run: pnpm i playwright http-server wait-on; npx playwright install --with-deps

- name: 📔 Build Storybook
run: pnpm build-storybook --quiet

# - name: 🧪 Serve Storybook and run tests
# run: |
# pnpx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
# "pnpm exec http-server storybook-static --port 6006 --silent" \
# "pnpm exec wait-on tcp:6006 && pnpm test-storybook"

# - name: 🔬 Run Unit Tests
# run: pnpm jest ...

# - name: 🔍 Run Integration Tests
# run: pnpm jest ...

# - name: ⌚ 💀 Run E2E Tests
# run: pnpx playwright test

- name: 👀 Run Visual Tests
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
run: pnpm chromatic

- name: 🏗️ Build Project
# env:
# SANITY_API_READ_TOKEN: ${{ secrets.SANITY_API_READ_TOKEN }}
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/RELEASE.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release

on:
push:
branches: '*'
pull_request:
branches: '*'

jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]

steps:
- name: 🛎️ Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0 # All history for branches and tags

- name: 📦 Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: 🛠️ Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: '${{ matrix.node-version }}'
cache: pnpm

- name: 📂 Install Dependencies
run: pnpm i

- name: 🤖 Run Semantic Release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: pnpm exec semantic-release

- name: 💰 Profit
run: echo 🐞
43 changes: 43 additions & 0 deletions .github/workflows/TEST_E2E.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: End-to-End Tests

on:
push:
branches: '*'
pull_request:
branches: '*'

jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]

steps:
- name: 🛎️ Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0 # All history for branches and tags

- name: 📦 Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: 🛠️ Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: '${{ matrix.node-version }}'
cache: pnpm

- name: 📂 Install Dependencies
run: pnpm i

- name: 🧐 Check Code Quality
run: pnpm lint

# - name: 🎭 Install Playwright
# run: pnpm i playwright http-server wait-on; npx playwright install --with-deps

- name: 💰 Profit
run: echo 🐞
40 changes: 40 additions & 0 deletions .github/workflows/TEST_VISUAL.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Visual Tests

on:
push:
branches: main

jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]

steps:
- name: 🛎️ Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0 # All history for branches and tags

- name: 📦 Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: 🛠️ Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: '${{ matrix.node-version }}'
cache: pnpm

- name: 📂 Install Dependencies
run: pnpm i

- name: 👀 Run Visual Tests
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
run: pnpm chromatic

- name: 💰 Profit
run: echo 🐞
Loading