Skip to content

Merge pull request #111 from openameba/chore/remove-renovate-badge #515

Merge pull request #111 from openameba/chore/remove-renovate-badge

Merge pull request #111 from openameba/chore/remove-renovate-badge #515

Workflow file for this run

name: test
on:
- push
- pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: test
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
node:
- 18
- 20
- 22
- lts/*
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ matrix.node }}
- id: npm-cache
run: echo "dir=$(npm config get cache)" | tee -a "$GITHUB_OUTPUT"
- id: npm-cache-restore
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: |
npm-
- run: npm ci
- run: npm test
- uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
if: github.ref_name == 'main'
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ steps.npm-cache-restore.outputs.cache-primary-key }}