Bump @metamask/utils
from ^8.1.0
to ^9.0.0
, devDep typescript
from ~4.4.0
to ~4.9.5
#298
Workflow file for this run
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: Build, Lint, and Test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
build-lint-test: | |
name: Build, Lint, and Test | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x, 20.x, 22.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Get Yarn cache directory | |
run: echo "::set-output name=YARN_CACHE_DIR::$(yarn cache dir)" | |
id: yarn-cache-dir | |
- name: Get Yarn version | |
run: echo "::set-output name=YARN_VERSION::$(yarn --version)" | |
id: yarn-version | |
- name: Cache yarn dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.yarn-cache-dir.outputs.YARN_CACHE_DIR }} | |
key: yarn-cache-${{ runner.os }}-${{ steps.yarn-version.outputs.YARN_VERSION }}-${{ hashFiles('yarn.lock') }} | |
# TODO: Remove --ignore-engines once devdeps compatible with node v20 | |
- run: yarn --frozen-lockfile --ignore-engines | |
if: "startsWith(matrix.node-version, '2')" | |
- run: yarn --frozen-lockfile | |
if: "!startsWith(matrix.node-version, '2')" | |
- run: yarn allow-scripts | |
- run: yarn build | |
- run: yarn lint | |
# We have to use xvfb due to electron | |
# Ref: https://github.com/facebook-atom/jest-electron-runner/issues/47#issuecomment-508556407 | |
- run: xvfb-run -e /dev/stdout yarn test | |
- name: Validate RC changelog | |
if: ${{ startsWith(github.head_ref, 'release/') }} | |
run: yarn auto-changelog validate --rc | |
- name: Validate changelog | |
if: ${{ !startsWith(github.head_ref, 'release/') }} | |
run: yarn auto-changelog validate | |
- name: Require clean working directory | |
shell: bash | |
run: | | |
if ! git diff --exit-code; then | |
echo "Working tree dirty at end of job" | |
exit 1 | |
fi | |
all-jobs-pass: | |
name: All jobs pass | |
runs-on: ubuntu-20.04 | |
needs: | |
- build-lint-test | |
steps: | |
- run: echo "Great success!" |