Skip to content

Commit

Permalink
# This is a combination of 4 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

ci: fixes

# This is the commit message #2:

ci: fixes

# This is the commit message #3:

ci: fixes

# This is the commit message #4:

# This is a combination of 9 commits.
# This is the 1st commit message:

ci: fixes

# This is the commit message #2:

ci: fixes

# This is the commit message #3:

ci: fixes

# This is the commit message #4:

ci: fixes

# This is the commit message #5:

ci: fixes

# This is the commit message #6:

ci: fixes

# This is the commit message #7:

ci: fixes

# This is the commit message #8:

ci: fixes

# This is the commit message #9:

ci: fixes
  • Loading branch information
gearonix committed Oct 6, 2023
1 parent 3a2e27c commit 975b26e
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 29 deletions.
22 changes: 22 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: setup
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v3
with:
main-branch-name: 'master'

- run: |
echo "BASE: ${{ env.NX_BASE }}"
echo "HEAD: ${{ env.NX_HEAD }}"
- name: Installing Node.js 19.x
uses: actions/setup-node@v3
with:
node-version: 19.x
cache: 'yarn'

- name: Installing dependencies
run: yarn install --frozen-lockfile
23 changes: 0 additions & 23 deletions .github/conf/setup.yml

This file was deleted.

13 changes: 9 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ on:
pull_request:
branches:
- master
- ci-testing
push:
branches:
- master
- ci-testing
workflow_call:

permissions:
Expand All @@ -16,19 +18,22 @@ jobs:
name: Creating a Production Build
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: using setup script
uses: ./.github/conf/setup.yml
uses: ./.github/actions/setup

- name: Creating a Production Build
run: yarn dlx nx run root:build

build-storybook:
name: Building and deploying storybook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: using setup script
uses: ./.github/conf/setup.yml
- uses: actions/checkout@v3
uses: ./.github/actions/setup/action.yml

- name: Building storybook
run: yarn dlx nx run ui:storybook:build
6 changes: 6 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ on:
pull_request:
branches:
- master
- ci-testing
push:
branches:
- master
- ci-testing
workflow_call:

permissions:
Expand All @@ -19,6 +21,10 @@ jobs:
name: Pushing workflow to build branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: using setup script
uses: ./.github/conf/setup.yml

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ on:
pull_request:
branches:
- master
- ci-testing
push:
branches:
- master
- ci-testing
permissions:
contents: write

Expand All @@ -14,6 +16,10 @@ jobs:
name: Linting project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: using setup script
uses: ./.github/conf/setup.yml

Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: setup

on:
workflow_call:

jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v3
with:
main-branch-name: 'master'

- run: |
echo "BASE: ${{ env.NX_BASE }}"
echo "HEAD: ${{ env.NX_HEAD }}"
- name: Installing Node.js 19.x
uses: actions/setup-node@v3
with:
node-version: 19.x
cache: 'yarn'

- name: Installing dependencies
run: yarn install --frozen-lockfile
15 changes: 13 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,39 @@ on:
pull_request:
branches:
- master
- ci-testing
push:
branches:
- master
- ci-testing
permissions:
contents: write

jobs:
build-storybook:
uses: ./.github/workflows/build.yml
test-storybook:

name: testing storybook
needs: [build-storybook]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: using setup script
uses: ./.github/conf/setup.yml
uses: Gearonix/code-gear/.github/conf/setup.yml

- name: Testing storybook in production
run: yarn dlx nx run ui:storybook:test:production
test:
name: testing project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: using setup script
uses: ./.github/conf/setup.yml
uses: Gearonix/code-gear/.github/conf/setup.yml

0 comments on commit 975b26e

Please sign in to comment.