2021-03-19 21:07:45 +00:00
|
|
|
|
name: Node CI
|
|
|
|
|
|
2021-04-21 16:55:49 +00:00
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches:
|
|
|
|
|
- main
|
|
|
|
|
pull_request:
|
|
|
|
|
branches:
|
|
|
|
|
- main
|
2021-03-19 21:07:45 +00:00
|
|
|
|
|
|
|
|
|
jobs:
|
2021-04-21 16:55:49 +00:00
|
|
|
|
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"]'
|
2021-03-26 19:45:53 +00:00
|
|
|
|
test:
|
2021-04-21 16:55:49 +00:00
|
|
|
|
needs: skip_test # allow skip_test to cancel this job if it’s not needed
|
2021-04-14 19:21:25 +00:00
|
|
|
|
runs-on: ${{ matrix.os }}
|
2021-03-19 21:07:45 +00:00
|
|
|
|
strategy:
|
|
|
|
|
matrix:
|
2021-04-14 19:21:25 +00:00
|
|
|
|
os: [ubuntu-latest, windows-latest]
|
|
|
|
|
node-version: [14.x, 15.x]
|
2021-03-19 21:07:45 +00:00
|
|
|
|
steps:
|
2021-03-26 19:45:53 +00:00
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
|
with:
|
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
|
- name: npm install, build, and test
|
|
|
|
|
run: |
|
|
|
|
|
cd examples/snowpack
|
|
|
|
|
npm ci
|
|
|
|
|
cd ../..
|
2021-03-23 19:20:03 +00:00
|
|
|
|
|
2021-03-26 19:45:53 +00:00
|
|
|
|
npm ci
|
|
|
|
|
npm run build
|
2021-04-21 16:14:44 +00:00
|
|
|
|
|
|
|
|
|
cd prettier-plugin-astro
|
|
|
|
|
npm ci
|
2021-04-21 16:55:49 +00:00
|
|
|
|
|
2021-04-21 16:14:44 +00:00
|
|
|
|
cd ../examples/kitchen-sink
|
2021-04-19 21:11:02 +00:00
|
|
|
|
npm ci
|
|
|
|
|
npm run build
|
|
|
|
|
cd ../..
|
2021-03-26 19:45:53 +00:00
|
|
|
|
npm test
|
|
|
|
|
env:
|
|
|
|
|
CI: true
|
2021-03-31 19:04:18 +00:00
|
|
|
|
lint:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
|
- run: npm ci
|
|
|
|
|
- run: npm run lint
|