Skip to content

Commit

Permalink
ci: fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gearonix committed Oct 6, 2023
1 parent 85c6230 commit 515d485
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 17 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ jobs:
name: Building and deploying storybook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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:
Expand All @@ -67,10 +70,22 @@ jobs:
echo "BASE: ${{ env.NX_BASE }}"
echo "HEAD: ${{ env.NX_HEAD }}"
- name: Installing Node.js 19.x
- name: Installing Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: stable
node-version: 20.8.0

- name: Cache Yarn dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/yarn
~/.yarn/cache
.yarn/cache
node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/*.yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Installing dependencies
run: yarn install
Expand Down
43 changes: 35 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ jobs:
name: Pushing workflow to build branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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:
Expand All @@ -35,11 +38,21 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 20.8.0
cache: 'yarn'

- name: Cache Yarn dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/yarn
~/.yarn/cache
.yarn/cache
node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/*.yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Installing dependencies
run: yarn install --immutable-cache
run: yarn install

- name: Pushing to build branch
uses: s0/git-publish-subdir-action@develop
Expand All @@ -55,7 +68,10 @@ jobs:
name: Building and deploying storybook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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:
Expand All @@ -65,14 +81,25 @@ jobs:
echo "BASE: ${{ env.NX_BASE }}"
echo "HEAD: ${{ env.NX_HEAD }}"
- name: Installing Node.js 19.x
- name: Installing Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: stable
cache: 'yarn'
node-version: 20.8.0

- name: Cache Yarn dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/yarn
~/.yarn/cache
.yarn/cache
node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/*.yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Installing dependencies
run: yarn install --immutable-cache
run: yarn install

- name: Pushing to build-storybook branch
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ jobs:
name: Linting project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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:
Expand All @@ -30,10 +33,22 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 20.8.0
cache: 'yarn'

- name: Cache Yarn dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/yarn
~/.yarn/cache
.yarn/cache
node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/*.yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Installing dependencies
run: yarn install --immutable-cache
run: yarn install


- name: Linting project
run: yarn dlx nx run root:lint
21 changes: 18 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ jobs:
needs: [build-storybook]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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:
Expand All @@ -34,10 +37,22 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 20.8.0
cache: 'yarn'

- name: Cache Yarn dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/yarn
~/.yarn/cache
.yarn/cache
node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/*.yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Installing dependencies
run: yarn install --immutable-cache
run: yarn install


- name: Testing storybook in production
run: yarn dlx nx run ui:storybook:test:production
Expand Down

0 comments on commit 515d485

Please sign in to comment.