Skip to content

ci: change to run dev devendency bump pull request only on node lts #376

ci: change to run dev devendency bump pull request only on node lts

ci: change to run dev devendency bump pull request only on node lts #376

Workflow file for this run

name: build
on:
push:
branches:
- main
- develop
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['16', '18', '20']
steps:
- uses: actions/checkout@v4
ref: ${{ github.event.pull_request.head.ref }}

Check failure on line 18 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / build

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 18, Col: 7): Unexpected value 'ref'
- name: Check for devDependencies bump pull request
run: |
message=$(git log --format=%B -n 1 ${{ github.event.pull_request.head.sha }})
if [ echo "$message" | grep -q -F "chore(deps-dev):" ] && [ ${{ matrix.node }} != "20" ]; then
echo "::set-output name=skip_ci::true"
else
echo "::set-output name=skip_ci::false"
fi
- name: Setup node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install
run: yarn install
- name: Build and test
run: yarn node-gyp rebuild && yarn jest
build-win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup node lts
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install
run: yarn install
- name: Build and test
run: yarn node-gyp rebuild && yarn jest
build-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup node lts
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install
run: yarn install
- name: Build and test
run: yarn node-gyp rebuild && yarn jest