Skip to content

Commit

Permalink
ci: workflow_run
Browse files Browse the repository at this point in the history
  • Loading branch information
pczeglik-iohk committed Apr 25, 2024
1 parent 10b70d7 commit f47186d
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 207 deletions.
67 changes: 12 additions & 55 deletions .github/workflows/chromatic-core.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,23 @@
name: Chromatic packages/core

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- packages/core/**
push:
branches:
- main
paths:
- packages/core/**
workflow_run:
workflows: [Prepare]
types: [completed]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- packages/core/**
push:
branches:
- main
paths:
- packages/core/**

jobs:
setup:
name: Prepare
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js and install dependencies
uses: ./.github/actions/install
with:
wallet-password: ${{ secrets.WALLET_PASSWORD_TESTNET }}

- name: Build icons
uses: ./.github/actions/build/package
with:
DIR: packages/icons
NAME: packages-icons

- name: Build ui
uses: ./.github/actions/build/package
with:
DIR: packages/ui
NAME: packages-ui

- name: Build common
uses: ./.github/actions/build/package
with:
DIR: packages/common
NAME: packages-common

- name: Build cardano
uses: ./.github/actions/build/package
with:
DIR: packages/cardano
NAME: packages-cardano

- name: Build core
uses: ./.github/actions/build/package
with:
DIR: packages/core
NAME: packages-core

deploy:
name: Deploy
runs-on: ubuntu-22.04
needs: setup

steps:
- name: Checkout repository
Expand Down
73 changes: 12 additions & 61 deletions .github/workflows/chromatic-staking.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,23 @@
name: Chromatic packages/staking

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- packages/staking/**
push:
branches:
- main
paths:
- packages/staking/**
workflow_run:
workflows: [Prepare]
types: [completed]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- packages/staking/**
push:
branches:
- main
paths:
- packages/staking/**

jobs:
setup:
name: Prepare
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js and install dependencies
uses: ./.github/actions/install
with:
wallet-password: ${{ secrets.WALLET_PASSWORD_TESTNET }}

- name: Build icons
uses: ./.github/actions/build/package
with:
DIR: packages/icons
NAME: packages-icons

- name: Build ui
uses: ./.github/actions/build/package
with:
DIR: packages/ui
NAME: packages-ui

- name: Build common
uses: ./.github/actions/build/package
with:
DIR: packages/common
NAME: packages-common

- name: Build cardano
uses: ./.github/actions/build/package
with:
DIR: packages/cardano
NAME: packages-cardano

- name: Build core
uses: ./.github/actions/build/package
with:
DIR: packages/core
NAME: packages-core

- name: Build staking
uses: ./.github/actions/build/package
with:
DIR: packages/staking
NAME: packages-staking

deploy:
name: Deploy
runs-on: ubuntu-22.04
needs: setup

steps:
- name: Checkout repository
Expand Down
50 changes: 13 additions & 37 deletions .github/workflows/chromatic-ui.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,24 @@
name: Chromatic packages/ui

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- packages/ui/**
push:
branches:
- main
paths:
- packages/ui/**
workflow_run:
workflows: [Prepare]
types: [completed]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- packages/ui/**
push:
branches:
- main
paths:
- packages/ui/**

jobs:
setup:
name: Prepare
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js and install dependencies
uses: ./.github/actions/install
with:
wallet-password: ${{ secrets.WALLET_PASSWORD_TESTNET }}

- name: Build icons
uses: ./.github/actions/build/package
with:
DIR: packages/icons
NAME: packages-icons

- name: Build ui
uses: ./.github/actions/build/package
with:
DIR: packages/ui
NAME: packages-ui

jobs:
deploy:
name: Deploy
runs-on: ubuntu-22.04
needs: setup

steps:
- name: Checkout repository
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/prepare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Prepare

on:
pull_request:

jobs:
setup:
name: Install and build
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js and install dependencies
uses: ./.github/actions/install
with:
wallet-password: ${{ secrets.WALLET_PASSWORD_TESTNET }}

- name: Build icons
uses: ./.github/actions/build/package
with:
DIR: packages/icons
NAME: packages-icons

- name: Build ui
uses: ./.github/actions/build/package
with:
DIR: packages/ui
NAME: packages-ui

- name: Build common
uses: ./.github/actions/build/package
with:
DIR: packages/common
NAME: packages-common

- name: Build cardano
uses: ./.github/actions/build/package
with:
DIR: packages/cardano
NAME: packages-cardano

- name: Build core
uses: ./.github/actions/build/package
with:
DIR: packages/core
NAME: packages-core

- name: Build staking
uses: ./.github/actions/build/package
with:
DIR: packages/staking
NAME: packages-staking
59 changes: 5 additions & 54 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,16 @@
name: Pull Request

on:
pull_request:
workflow_run:
workflows:
- Prepare
types:
- completed

jobs:
prepare:
name: Prepare
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js and install dependencies
uses: ./.github/actions/install
with:
wallet-password: ${{ secrets.WALLET_PASSWORD_TESTNET }}

- name: Build icons
uses: ./.github/actions/build/package
with:
DIR: packages/icons
NAME: packages-icons

- name: Build ui
uses: ./.github/actions/build/package
with:
DIR: packages/ui
NAME: packages-ui

- name: Build common
uses: ./.github/actions/build/package
with:
DIR: packages/common
NAME: packages-common

- name: Build cardano
uses: ./.github/actions/build/package
with:
DIR: packages/cardano
NAME: packages-cardano

- name: Build core
uses: ./.github/actions/build/package
with:
DIR: packages/core
NAME: packages-core

- name: Build staking
uses: ./.github/actions/build/package
with:
DIR: packages/staking
NAME: packages-staking

unitTests:
name: Unit tests
runs-on: ubuntu-22.04
needs: prepare

steps:
- name: Checkout repository
Expand Down Expand Up @@ -111,7 +63,6 @@ jobs:
smokeTests:
name: Smoke tests
runs-on: ubuntu-22.04
needs: prepare

steps:
- name: Checkout repository
Expand Down

0 comments on commit f47186d

Please sign in to comment.