Skip to content

Partially sync GitHub workflows with module template (#221) #397

Partially sync GitHub workflows with module template (#221)

Partially sync GitHub workflows with module template (#221) #397

Workflow file for this run

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: [18.x, 20.x]
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
with:
is-high-risk-environment: false
node-version: ${{ matrix.node-version }}
cache-node-modules: ${{ matrix.node-version == '20.x' }}
- run: yarn allow-scripts
- run: yarn build
- run: 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 after building"
exit 1
fi
all-jobs-pass:
name: All jobs pass
runs-on: ubuntu-20.04
needs:
- build-lint-test
steps:
- run: echo "Great success!"