Skip to content

Commit

Permalink
feat(workflows): feat(workflows): create 'test.yml' reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
oscard0m committed Jul 15, 2022
1 parent ec0a8f8 commit c071d9c
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test

on:
workflow_call:
inputs:
node_versions:
required: true
type: string

jobs:
test_matrix:
runs-on: ubuntu-latest
strategy:
matrix:
node_version:
- 14
- 16
- 18
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- name: "Test with Node.js ${{ matrix.node_version }}"
uses: actions/setup-node@5b949b50c3461bbcd5a540b150c368278160234a # tag=v3
with:
node-version: "${{ matrix.node_version }}"
cache: npm
- run: npm ci
- run: npm run test --ignore-scripts # run lint only once
test:
runs-on: ubuntu-latest
needs: test_matrix
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- run: npm ci
- run: npm run lint --if-present

0 comments on commit c071d9c

Please sign in to comment.