Skip to content

Commit

Permalink
Use older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
edlu77 committed Feb 15, 2024
1 parent afb93fd commit 6cf8446
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/actions/deploy-comment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
using: composite
steps:
- name: Find Comment
uses: peter-evans/find-comment@v3
uses: peter-evans/find-comment@v2
id: 'fc'
with:
issue-number: ${{ github.event.pull_request.number }}
Expand All @@ -27,7 +27,7 @@ runs:
- name: Update Comment
if: steps.fc.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v4
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{steps.fc.outputs.comment-id}}
edit-mode: replace
Expand Down
21 changes: 18 additions & 3 deletions .github/actions/prepare-deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ inputs:
description: Whether to build code documentation
required: false
default: 'true'
build-storybook:
description: Whether to build storybook
required: false
default: 'true'

runs:
using: composite
Expand All @@ -32,7 +36,7 @@ runs:
if: ${{ inputs.skip-node-js == 'false' }}
uses: ./.github/actions/setup-node-js
- name: Configure nx
uses: nrwl/nx-set-shas@v4
uses: nrwl/nx-set-shas@v3
with:
main-branch-name: ${{ inputs.main-branch-name }}

Expand All @@ -44,17 +48,28 @@ runs:
shell: bash
run: npx nx ${{ inputs.nx-command }} --targets=compodoc --configuration=ci

- name: Build storybook
if: ${{ inputs.build-storybook == 'true' }}
shell: bash
run: |
# Run one at a time due to https://github.com/nrwl/nx/issues/6842
# Will hopefully be fixed by backport of https://github.com/storybookjs/storybook/pull/19307
npx nx ${{ inputs.nx-command }} --targets=build-storybook --configuration=ci --parallel=false
env:
STORYBOOK_DISABLE_TELEMETRY: '1'

- name: Collect artifacts
id: collect
shell: bash
run: ${{ github.action_path }}/collect_artifacts.sh ${{ inputs.deploy-directory }} dist/{apps,compodoc}
run: ${{ github.action_path }}/collect_artifacts.sh ${{ inputs.deploy-directory }} dist/{apps,compodoc,storybook}

- name: Generate index file
uses: cuchi/[email protected].2
uses: cuchi/[email protected].0
with:
template: ${{ github.action_path }}/index.html.j2
output_file: ${{ inputs.deploy-directory }}/index.html
strict: true
variables: |
apps=${{ steps.collect.outputs.apps }}
storybook=${{ inputs.build-storybook == 'true' && steps.collect.outputs.storybook || '' }}
compodoc=${{ inputs.build-compodoc == 'true' && steps.collect.outputs.compodoc || '' }}
8 changes: 4 additions & 4 deletions .github/actions/setup-node-js/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ inputs:
node-version:
description: Node.js version
required: false
default: '20'
default: '16'

runs:
using: composite
steps:
- name: Use Node.js ${{ inputs.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
- name: Cache .npm
uses: actions/cache@v4
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache node_modules
id: modules_cache
uses: actions/cache@v4
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-previews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

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

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ concurrency:
jobs:
main:
name: Nx Cloud - Main Job
uses: nrwl/ci/.github/workflows/nx-cloud-main.yml@v0.14.0
uses: nrwl/ci/.github/workflows/nx-cloud-main.yml@v0.11.2
with:
number-of-agents: 3
init-commands: |
npx nx-cloud start-ci-run --stop-agents-after="build" --agent-count=3
parallel-commands: |
npx nx-cloud record -- npx nx workspace-lint
npx nx-cloud record -- npx nx format:check
parallel-commands-on-agents: |
npx nx affected --target=lint --parallel=3
Expand All @@ -31,7 +30,7 @@ jobs:

agents:
name: Nx Cloud - Agents
uses: nrwl/ci/.github/workflows/nx-cloud-agents.yml@v0.14.0
uses: nrwl/ci/.github/workflows/nx-cloud-agents.yml@v0.11.2
with:
number-of-agents: 3

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/production-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
ref: main
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
ref: develop
fetch-depth: 0
Expand Down
41 changes: 26 additions & 15 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,16 @@
"affected": {
"defaultBase": "main"
},
"generators": {
"@nx/angular:application": {
"e2eTestRunner": "cypress",
"linter": "eslint",
"style": "scss",
"unitTestRunner": "jest"
}
},
"namedInputs": {
"sharedGlobals": [],
"default": ["{projectRoot}/website", "sharedGlobals"],
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"production": [
"default",
"!{projectRoot}/apps/website/tsconfig.spec.json",
"!{projectRoot}/apps/website/**/*.spec.[jt]s",
"!{projectRoot}/apps/website/karma.conf.js",
"!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/**/*.spec.[jt]s",
"!{projectRoot}/karma.conf.js",
"!{projectRoot}/.eslintrc.json",
"!{projectRoot}/apps/website/eslint.config.js"
"!{projectRoot}/eslint.config.js"
]
},
"plugins": [
Expand All @@ -44,7 +36,6 @@
}
}
],
"nxCloudAccessToken": "YTQ0M2Y3ODAtYzM5NC00ZjY4LTkyZjEtZjA2Y2M4NGM2N2JhfHJlYWQtd3JpdGU=",
"targetDefaults": {
"@angular-devkit/build-angular:browser": {
"cache": true,
Expand All @@ -67,5 +58,25 @@
"e2e": {
"inputs": ["default", "^production"]
}
}
},
"generators": {
"@nx/angular:application": {
"e2eTestRunner": "cypress",
"linter": "eslint",
"style": "scss",
"unitTestRunner": "jest"
},
"@nx/angular:library": {
"linter": "eslint",
"unitTestRunner": "jest"
},
"@nx/angular:component": {
"style": "scss",
"changeDetection": "OnPush",
"displayBlock": true,
"export": true,
"standalone": true
}
},
"nxCloudAccessToken": "NWM3NTZiNjktMDcyMS00ZmQ3LWFlNzYtZDZkZmY0OTVjYzU3fHJlYWQtd3JpdGU="
}

0 comments on commit 6cf8446

Please sign in to comment.