chore(CI): periodic check SHOW_UPCOMING_CHANGES (#39806)
This commit is contained in:
committed by
GitHub
parent
dec409a4bd
commit
e725774565
95
.github/workflows/nodejs-next-test.js
vendored
Normal file
95
.github/workflows/nodejs-next-test.js
vendored
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
name: Node.js CI (Next)
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
# Treat the below branches as special case for working on workflows
|
||||||
|
- actions-**
|
||||||
|
- upcoming-**
|
||||||
|
schedule:
|
||||||
|
# run this Action every 14 days
|
||||||
|
- cron: '0 * */14 * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
name: Lint
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [12.x]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Source Files
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
|
- name: Cache node modules
|
||||||
|
uses: actions/cache@v2
|
||||||
|
env:
|
||||||
|
cache-name: cache-node-modules
|
||||||
|
with:
|
||||||
|
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||||
|
${{ runner.os }}-build-
|
||||||
|
${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Set Environment variables
|
||||||
|
run: cp sample.env .env
|
||||||
|
|
||||||
|
- name: Lint Source Files
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
npm run ensure-env --if-present
|
||||||
|
npm run lint --if-present
|
||||||
|
|
||||||
|
test:
|
||||||
|
name: Test
|
||||||
|
needs: lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [12.x]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Source Files
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
|
- name: Cache node modules
|
||||||
|
uses: actions/cache@v2
|
||||||
|
env:
|
||||||
|
cache-name: cache-node-modules
|
||||||
|
with:
|
||||||
|
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||||
|
${{ runner.os }}-build-
|
||||||
|
${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Set Environment variables
|
||||||
|
run: cp sample.env .env
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
env: SHOW_UPCOMING_CHANGES=true
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
npm run ensure-env --if-present
|
||||||
|
|
||||||
|
- name: Run Tests
|
||||||
|
run: npm test
|
Reference in New Issue
Block a user