4.0.0-next.2 #910
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR NG 15 | |
on: | |
workflow_dispatch: | |
workflow_call: | |
# pull_request_target: | |
# branches: | |
# - main | |
jobs: | |
doc_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Derive appropriate SHAs for base and head for `nx affected` commands | |
uses: nrwl/nx-set-shas@v2 | |
- name: Restore cache | |
id: cache-restore | |
uses: actions/cache/restore@v3 | |
with: | |
path: ./node_modules | |
key: ${{ runner.os }}-node_modules_ng_15-${{ hashFiles('package-lock.json.ng15') }} | |
restore-keys: | | |
${{ runner.os }}-node_modules_ng_15- | |
- name: 'Initial changes 15' | |
run: | | |
cp -f package.json.ng15 package.json | |
cp -f package-lock.json.ng15 package-lock.json | |
- name: Install dependencies | |
if: steps.cache-restore.outputs.cache-hit != 'true' | |
run: npm ci --ignore-scripts | |
- name: Save cache... | |
id: cache-save | |
uses: actions/cache/save@v3 | |
if: ${{ steps.cache-restore.outputs.cache-hit != 'true' && always() }} | |
with: | |
path: ./node_modules | |
key: ${{ steps.cache-restore.outputs.cache-primary-key }} | |
- name: 'Increase max memory limit' | |
run: | | |
export NODE_OPTIONS="--max_old_space_size=4096" | |
- name: 'Set version 15' | |
run: npx nx generate @prizm-ui/nx-mv:apply -n v15 | |
- name: 'Clears all the cached Nx artifacts and metadata ' | |
run: npx nx reset | |
- name: 'Build doc app for firebase hosting' | |
run: npm run build:doc | |
- name: 'Upload to Firebase HOSTING (NG15)' | |
uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: '${{ secrets.GITHUB_TOKEN }}' | |
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_PRIZMUI }}' | |
expires: 5d | |
target: v2 | |
projectId: prizmui | |
lint_build_test: | |
needs: doc_deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Derive appropriate SHAs for base and head for `nx affected` commands | |
uses: nrwl/nx-set-shas@v2 | |
- name: Restore cache | |
id: cache-restore | |
uses: actions/cache/restore@v3 | |
with: | |
path: ./node_modules | |
key: ${{ runner.os }}-node_modules_ng_15-${{ hashFiles('package-lock.json.ng15') }} | |
restore-keys: | | |
${{ runner.os }}-node_modules_ng_15- | |
- name: 'Initial changes 15' | |
run: | | |
cp -f package.json.ng15 package.json | |
cp -f package-lock.json.ng15 package-lock.json | |
- name: Install dependencies | |
if: steps.cache-restore.outputs.cache-hit != 'true' | |
run: npm ci --ignore-scripts | |
- name: Save cache... | |
id: cache-save | |
uses: actions/cache/save@v3 | |
if: ${{ steps.cache-restore.outputs.cache-hit != 'true' && always() }} | |
with: | |
path: ./node_modules | |
key: ${{ steps.cache-restore.outputs.cache-primary-key }} | |
- name: 'Increase max memory limit' | |
run: | | |
export NODE_OPTIONS="--max_old_space_size=4096" | |
# - run: npx nx workspace-lint | |
# - run: npx nx clear-cache | |
- name: 'Set version 14' | |
run: npx nx generate @prizm-ui/nx-mv:apply -n v15 | |
- name: 'Clears all the cached Nx artifacts and metadata ' | |
run: npx nx reset | |
- run: npx nx affected --target=test --base=origin/main --parallel --max-parallel=3 | |
- run: npx nx affected --target=lint --base=origin/main | |
# - run: npx nx affected --target=lint --base=origin/main --parallel --max-parallel=3 | |
# TODO remove schematics excluding after fix | |
- run: npx nx affected --target=build --base=origin/main --prod | |
- run: npx nx format:check --base=origin/main | |
# TODO LATER fix playwright test | |
# - name: Install Cypress | |
# run: npx cypress install | |
# - name: Run e2e cypress test | |
# run: npx nx affected --target=e2e --base=main --prod --parallel --max-parallel=3 |