ci: update preset workflows

This commit is contained in:
lowlighter
2022-01-26 21:07:54 -05:00
parent da4cbe4e1e
commit c2a688c353
2 changed files with 55 additions and 0 deletions

30
.github/workflows/ci.test.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: Continuous integration (presets)
on:
push:
branches: [ presets ]
jobs:
test:
name: Test
if: "!contains(github.event.head_commit.message, '[skip test]')"
uses: lowlighter/metrics/.github/workflows/test.presets.yml@master
publish-examples:
name: Publish examples
needs: [ test ]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: 17
- name: Setup metrics
run: npm ci
- name: Run tests
run: npm run test-presets -- publish

25
.github/workflows/test.presets.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Test
on:
pull_request:
branches: [ master ]
workflow_call:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: 17
- name: Setup metrics
run: npm ci
- name: Run tests
run: npm run test-presets