Skip to content

chore: Replace deprecated global functions with relevant equivalents. #11533

chore: Replace deprecated global functions with relevant equivalents.

chore: Replace deprecated global functions with relevant equivalents. #11533

Workflow file for this run

name: MDC Test
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, edited]
jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/cache@v2
with:
path: |
node_modules
packages/*/node_modules
!packages/*/node_modules/@material
key: ${{ runner.os }}-lerna-${{ hashFiles('package-lock.json', 'packages/**/package.json') }}
- run: npm ci --ignore-scripts
- run: npm run bootstrap
conventional-commit-check:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v1.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-test:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- uses: actions/cache@v2
with:
path: |
node_modules
packages/*/node_modules
!packages/*/node_modules/@material
key: ${{ runner.os }}-lerna-${{ hashFiles('package-lock.json', 'packages/**/package.json') }}
- run: npm run link
- run: |
npm run dist
node scripts/cp-pkgs.js
node scripts/verify-pkg-main.js
unit-test:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- uses: actions/cache@v2
with:
path: |
node_modules
packages/*/node_modules
!packages/*/node_modules/@material
key: ${{ runner.os }}-lerna-${{ hashFiles('package-lock.json', 'packages/**/package.json') }}
- run: npm run link
- name: Run unit tests
run: |
# Unit tests does not run on forked repositories because GitHub
# secrets (that includes Sauce access info) are not shared.
if [[ -z "$SAUCE_USERNAME$SAUCE_ACCESS_KEY" ]]; then
echo "Unit tests do not run on forked repos because of Sauce labs access. Run 'npm run test:unit' manually to verify."
exit 1
else
export SAUCE_BUILD_ID=mdc-tests-${GITHUB_EVENT_NAME}-${GITHUB_ACTION}-${GITHUB_SHA}
export SAUCE_TUNNEL_ID=${SAUCE_BUILD_ID}-tunnel
npm run test:unit
fi
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
dependency-test:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- uses: actions/cache@v2
with:
path: |
node_modules
packages/*/node_modules
!packages/*/node_modules/@material
key: ${{ runner.os }}-lerna-${{ hashFiles('package-lock.json', 'packages/**/package.json') }}
- run: npm run link
- name: Run dependency tests
run: |
npm run test:dependency