Skip to content

Commit

Permalink
ci: updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gearonix committed Oct 6, 2023
1 parent 3a9cae8 commit 8e05382
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 92 deletions.
23 changes: 23 additions & 0 deletions .github/conf/setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# basic configuration

- uses: actions/checkout@v3
with:
fetch-depth: 0

- 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
42 changes: 7 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CodeGear CI > build
name: code-gear > build
on:
pull_request:
branches: [ master ]
Expand All @@ -13,47 +13,19 @@ jobs:
name: Creating a Production Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- 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
- name: using setup script
uses: ./.github/conf/setup.yml

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

build-storybook:
name: Building and deploying storybook
runs-on: ubuntu-latest
steps:
- name: using setup script
uses: ./.github/conf/setup.yml
- uses: actions/checkout@v3

- name: Installing Node.js 19.x
uses: actions/setup-node@v3
with:
node-version: 19.x
cache: 'yarn'

- name: Installing dependencies
run: yarn install

- name: Building storybook
run: |
yarn dlx nx run ui:storybook:build
run: yarn dlx nx run ui:storybook:build
26 changes: 5 additions & 21 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CodeGear CI > build
name: code-gear > build
on:
pull_request:
branches: [ master ]
Expand All @@ -16,16 +16,8 @@ jobs:
name: Pushing workflow to build branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Installing Node.js 19.x
uses: actions/setup-node@v3
with:
node-version: 19.x
cache: 'yarn'

- name: Installing dependencies
run: yarn install
- name: using setup script
uses: ./.github/conf/setup.yml

- name: Pushing to build branch
uses: s0/git-publish-subdir-action@develop
Expand All @@ -41,16 +33,8 @@ jobs:
name: Building and deploying storybook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Installing Node.js 19.x
uses: actions/setup-node@v3
with:
node-version: 19.x
cache: 'yarn'

- name: Installing dependencies
run: yarn install
- name: using setup script
uses: ./.github/conf/setup.yml

- name: Pushing to build-storybook branch
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CodeGear CI > lint
name: code-gear > lint
on:
pull_request:
branches: [ master ]
Expand All @@ -11,17 +11,8 @@ jobs:
name: Linting project
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
- name: Installing Node.js 19.x
uses: actions/setup-node@v3
with:
node-version: 19.x
cache: 'yarn'

- name: Installing dependencies
run: yarn install
- name: using setup script
uses: ./.github/conf/setup.yml

- name: Linting project
run: |
yarn dlx nx run lint
run: yarn dlx nx run root:lint
26 changes: 6 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CodeGear CI > tests
name: code-gear > tests
on:
pull_request:
branches: [ master ]
Expand All @@ -14,28 +14,14 @@ jobs:
needs: [build-storybook]
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
- name: Installing Node.js 19.x
uses: actions/setup-node@v3
with:
node-version: 19.x
cache: 'yarn'

- name: Installing dependencies
run: yarn install
- name: using setup script
uses: ./.github/conf/setup.yml

- name: Testing storybook in production
run: |
yarn dlx nx run ui:storybook:test:production
run: yarn dlx nx run ui:storybook:test:production
test:
name: testing project
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
- name: Installing Node.js 19.x
uses: actions/setup-node@v3
with:
node-version: 19.x
cache: 'yarn'
- name: using setup script
uses: ./.github/conf/setup.yml
3 changes: 0 additions & 3 deletions .npmrc

This file was deleted.

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.8.0

0 comments on commit 8e05382

Please sign in to comment.