chore(ci): add passing status checks when ignoring website changes (#6390)
This commit is contained in:
parent
48d6a25f2e
commit
5799f190c8
35
.github/workflows/nodejs.yml
vendored
35
.github/workflows/nodejs.yml
vendored
@ -4,49 +4,61 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
paths-ignore:
|
|
||||||
- 'website/**'
|
|
||||||
|
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
|
|
||||||
paths-ignore:
|
|
||||||
- 'website/**'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
changes:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
cms: ${{ steps.filter.outputs.cms }}
|
||||||
|
steps:
|
||||||
|
- uses: dorny/paths-filter@v2
|
||||||
|
id: filter
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
cms:
|
||||||
|
- '!website/**'
|
||||||
build:
|
build:
|
||||||
|
needs: changes
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
if: ${{ needs.changes.outputs.cms == 'true' }}
|
||||||
- name: Use Node.js
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '*'
|
node-version: '*'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
if: ${{ needs.changes.outputs.cms == 'true' }}
|
||||||
- name: log versions
|
- name: log versions
|
||||||
run: node --version && npm --version && yarn --version
|
run: node --version && npm --version && yarn --version
|
||||||
|
if: ${{ needs.changes.outputs.cms == 'true' }}
|
||||||
- name: install dependecies
|
- name: install dependecies
|
||||||
run: yarn --frozen-lockfile --network-timeout 1000000 && yarn bootstrap
|
run: yarn --frozen-lockfile --network-timeout 1000000 && yarn bootstrap
|
||||||
|
if: ${{ needs.changes.outputs.cms == 'true' }}
|
||||||
- name: run unit tests
|
- name: run unit tests
|
||||||
run: yarn test:ci
|
run: yarn test:ci
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
NODE_OPTIONS: --max-old-space-size=4096
|
NODE_OPTIONS: --max-old-space-size=4096
|
||||||
|
if: ${{ needs.changes.outputs.cms == 'true' }}
|
||||||
- name: build demo site
|
- name: build demo site
|
||||||
run: yarn build:demo
|
run: yarn build:demo
|
||||||
env:
|
env:
|
||||||
NODE_OPTIONS: --max-old-space-size=4096
|
NODE_OPTIONS: --max-old-space-size=4096
|
||||||
|
if: ${{ needs.changes.outputs.cms == 'true' }}
|
||||||
- uses: actions/upload-artifact@master
|
- uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
name: dev-test-website-${{ runner.os }}
|
name: dev-test-website-${{ runner.os }}
|
||||||
path: dev-test
|
path: dev-test
|
||||||
|
if: ${{ needs.changes.outputs.cms == 'true' }}
|
||||||
|
|
||||||
e2e-with-cypress:
|
e2e-with-cypress:
|
||||||
needs: build
|
needs: [changes, build]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
@ -56,22 +68,26 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
if: ${{ needs.changes.outputs.cms == 'true' }}
|
||||||
- name: Use Node.js
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '*'
|
node-version: '*'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
cache: yarn
|
cache: yarn
|
||||||
|
if: ${{ needs.changes.outputs.cms == 'true' }}
|
||||||
- uses: actions/download-artifact@master
|
- uses: actions/download-artifact@master
|
||||||
with:
|
with:
|
||||||
name: dev-test-website-${{ runner.os }}
|
name: dev-test-website-${{ runner.os }}
|
||||||
path: dev-test
|
path: dev-test
|
||||||
|
if: ${{ needs.changes.outputs.cms == 'true' }}
|
||||||
- name: npm install
|
- name: npm install
|
||||||
run: |
|
run: |
|
||||||
node --version
|
node --version
|
||||||
npm --version
|
npm --version
|
||||||
yarn --version
|
yarn --version
|
||||||
yarn --frozen-lockfile
|
yarn --frozen-lockfile
|
||||||
|
if: ${{ needs.changes.outputs.cms == 'true' }}
|
||||||
- name: e2e test
|
- name: e2e test
|
||||||
run: |
|
run: |
|
||||||
yarn test:e2e:run-ci
|
yarn test:e2e:run-ci
|
||||||
@ -81,8 +97,9 @@ jobs:
|
|||||||
NODE_OPTIONS: --max-old-space-size=4096
|
NODE_OPTIONS: --max-old-space-size=4096
|
||||||
MACHINE_COUNT: 8
|
MACHINE_COUNT: 8
|
||||||
MACHINE_INDEX: ${{ matrix.machine }}
|
MACHINE_INDEX: ${{ matrix.machine }}
|
||||||
|
if: ${{ needs.changes.outputs.cms == 'true' }}
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: ${{ always() }}
|
if: ${{ always() && needs.changes.outputs.cms == 'true' }}
|
||||||
with:
|
with:
|
||||||
name: cypress-results-${{ matrix.machine }}
|
name: cypress-results-${{ matrix.machine }}
|
||||||
path: |
|
path: |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user