Skip to content

Run compatibility checks only in main branch. #1

Run compatibility checks only in main branch.

Run compatibility checks only in main branch. #1

name: Compatibility Test

Check failure on line 1 in .github/workflows/compatibility-test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/compatibility-test.yml

Invalid workflow file

Unexpected tag '!inputs.enabled'
on:
workflow_call:
inputs:
enabled:
required: false
type: boolean
default: true
jobs:
enabled-check:
runs-on: ubuntu-latest
steps:
- name: Skipping compatibility test
if: !inputs.enabled
run: echo "Skipping compatibility test"
compatibility-test:
needs: enabled-check
if: inputs.enabled
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: MetaMask/action-checkout-and-setup@v1
with:
is-high-risk-environment: false
node-version: ${{ matrix.node-version }}
- run: rm yarn.lock && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn
- run: yarn test
- run: git restore yarn.lock
- shell: bash
run: |
if ! git diff --exit-code; then
echo "Working tree dirty at end of job"
exit 1
fi