Only run CI on pull requests and merges, not every commit (#119)
This commit is contained in:
parent
54409a0702
commit
78fe1cbaf4
1 changed files with 23 additions and 3 deletions
26
.github/workflows/nodejs.yml
vendored
26
.github/workflows/nodejs.yml
vendored
|
@ -1,15 +1,35 @@
|
||||||
name: Node CI
|
name: Node CI
|
||||||
|
|
||||||
on: [push]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
skip_test:
|
||||||
|
continue-on-error: true
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||||
|
steps:
|
||||||
|
- id: skip_check
|
||||||
|
uses: fkirc/skip-duplicate-actions@master
|
||||||
|
with:
|
||||||
|
# All of these options are optional, so you can remove them if you are happy with the defaults
|
||||||
|
concurrent_skipping: 'never'
|
||||||
|
skip_after_successful_duplicate: 'true'
|
||||||
|
paths_ignore: '["**/README.md", "**/docs/**"]'
|
||||||
|
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
|
||||||
test:
|
test:
|
||||||
|
needs: skip_test # allow skip_test to cancel this job if it’s not needed
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest]
|
os: [ubuntu-latest, windows-latest]
|
||||||
node-version: [14.x, 15.x]
|
node-version: [14.x, 15.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
@ -27,7 +47,7 @@ jobs:
|
||||||
|
|
||||||
cd prettier-plugin-astro
|
cd prettier-plugin-astro
|
||||||
npm ci
|
npm ci
|
||||||
|
|
||||||
cd ../examples/kitchen-sink
|
cd ../examples/kitchen-sink
|
||||||
npm ci
|
npm ci
|
||||||
npm run build
|
npm run build
|
||||||
|
|
Loading…
Reference in a new issue